]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf8124c0cf98e6cf9e7dee3dbe15d0c307892c3a0
tree08f6f7ffbae8ea1e89560930942824c304c0977d
parent95bff9fd66ecd812d590c69387965cb20664fd49
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: 83dfdb6b8470 ("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