fscache: Fix if condition in fscache_wait_on_volume_collision()
authorYue Hu <huyue2@coolpad.com>
Wed, 25 May 2022 02:32:22 +0000 (10:32 +0800)
committerDavid Howells <dhowells@redhat.com>
Tue, 5 Jul 2022 15:12:20 +0000 (16:12 +0100)
commitbf17455b9cbd4b10bf30d39c047307e1d774fb1a
tree08f6f7ffbae8ea1e89560930942824c304c0977d
parent03c765b0e3b4cb5063276b086c76f7a612856a9a
fscache: Fix if condition in fscache_wait_on_volume_collision()

After waiting for the volume to complete the acquisition with timeout,
the if condition under which potential volume collision occurs should be
acquire the volume is still pending rather than not pending so that we
will continue to wait until the pending flag is cleared. Also, use the
existing test pending wrapper directly instead of test_bit().

Fixes: 62ab63352350 ("fscache: Implement volume registration")
Signed-off-by: Yue Hu <huyue2@coolpad.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://listman.redhat.com/archives/linux-cachefs/2022-May/006918.html
fs/fscache/volume.c