ceph: allow queueing cap/snap handling after putting cap references
authorJeff Layton <jlayton@kernel.org>
Thu, 10 Dec 2020 19:39:26 +0000 (14:39 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 16 Feb 2021 11:09:51 +0000 (12:09 +0100)
commita8810cdc007f816e0e2448879ebd84152ce8c907
tree5b95f4fe5b598e155e07842f8eabbe1c4d36eb2e
parent64f28c627a27abb053561275bf94fbcc78e66198
ceph: allow queueing cap/snap handling after putting cap references

Testing with the fscache overhaul has triggered some lockdep warnings
about circular lock dependencies involving page_mkwrite and the
mmap_lock. It'd be better to do the "real work" without the mmap lock
being held.

Change the skip_checking_caps parameter in __ceph_put_cap_refs to an
enum, and use that to determine whether to queue check_caps, do it
synchronously or not at all. Change ceph_page_mkwrite to do a
ceph_put_cap_refs_async().

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c
fs/ceph/caps.c
fs/ceph/inode.c
fs/ceph/super.h