path: root/fs
diff options
authorDavid Howells <>2022-01-14 13:30:17 +0000
committerDavid Howells <>2022-01-21 21:36:28 +0000
commit80a00ab8344f0fe4d555a1f97960215b659436e9 (patch)
treed827a31b700a4964a34963bea567e37e7457b38a /fs
parent455e73a07f6e288b0061dfcf4fcf54fa9fe06458 (diff)
fscache: Fix the volume collision wait condition
The condition that the waits in fscache_wait_on_volume_collision() are waiting until are inverted. This suddenly started happening on the upstream kernel with something like the following appearing in dmesg when running xfstests: CacheFiles: cachefiles: Inode already in use: Iafs,,100055 Fix them by inverting the conditions. Fixes: 62ab63352350 ("fscache: Implement volume registration") Signed-off-by: David Howells <> Reviewed-by: Jeff Layton <> cc: Link: # v1
Diffstat (limited to 'fs')
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)
- 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);
- wait_var_event(&candidate->flags, fscache_is_acquire_pending(candidate));
+ wait_var_event(&candidate->flags, !fscache_is_acquire_pending(candidate));