summaryrefslogtreecommitdiff
path: root/fs/fscache/volume.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-22 11:59:32 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-22 11:59:32 +0300
commit7fd350f6ff846f788ba5f6668bacf2ce4257ed8f (patch)
treeb94760f20590fcfda8851bc62a9888f281540033 /fs/fscache/volume.c
parentb68b10b6266009bc8770adf952d637250ee93135 (diff)
parentcef0223191452b3c493a1070baad9ffe806babac (diff)
downloadlinux-7fd350f6ff846f788ba5f6668bacf2ce4257ed8f.tar.xz
Merge tag 'fscache-fixes-20220121' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull more fscache updates from David Howells: "A set of fixes and minor updates for the fscache rewrite: - Fix mishandling of volume collisions (the wait condition is inverted and so it was only waiting if the volume collision was already resolved). - Fix miscalculation of whether there's space available in cachefiles. - Make sure a default cache name is set on a cache if the user hasn't set one by the time they bind the cache. - Adjust the way the backing inode is presented in tracepoints, add a tracepoint for mkdir and trace directory lookup. - Add a tracepoint for failure to set the active file mark. - Add an explanation of the checks made on the backing filesystem. - Check that the backing filesystem supports tmpfile. - Document how the page-release cancellation of the read-skip optimisation works. And I've included a change for netfslib: - Make ops->init_rreq() optional" * tag 'fscache-fixes-20220121' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: netfs: Make ops->init_rreq() optional fscache: Add a comment explaining how page-release optimisation works cachefiles: Check that the backing filesystem supports tmpfiles cachefiles: Explain checks in a comment cachefiles: Trace active-mark failure cachefiles: Make some tracepoint adjustments cachefiles: set default tag name if it's unspecified cachefiles: Calculate the blockshift in terms of bytes, not pages fscache: Fix the volume collision wait condition
Diffstat (limited to 'fs/fscache/volume.c')
-rw-r--r--fs/fscache/volume.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fscache/volume.c b/fs/fscache/volume.c
index a57c6cbee858..f2aa7dbad766 100644
--- a/fs/fscache/volume.c
+++ b/fs/fscache/volume.c
@@ -142,12 +142,12 @@ static void fscache_wait_on_volume_collision(struct fscache_volume *candidate,
unsigned int collidee_debug_id)
{
wait_var_event_timeout(&candidate->flags,
- fscache_is_acquire_pending(candidate), 20 * HZ);
+ !fscache_is_acquire_pending(candidate), 20 * HZ);
if (!fscache_is_acquire_pending(candidate)) {
pr_notice("Potential volume collision new=%08x old=%08x",
candidate->debug_id, collidee_debug_id);
fscache_stat(&fscache_n_volumes_collision);
- wait_var_event(&candidate->flags, fscache_is_acquire_pending(candidate));
+ wait_var_event(&candidate->flags, !fscache_is_acquire_pending(candidate));
}
}