I've been working on the fscache rework, and have hit some rather complex lockdep circular locking warnings. Most of them involve two filesystems (cephfs and the local cachefiles fs), so it's not clear to me whether they are false positives. They do involve the mmap_lock though, which is taken up in the vfs. I think it would probably be best to not do the ceph_check_caps call with that lock held if we can avoid it. The first patch in this series fixes what looks like a probable bug to me. If we want to avoid checking caps in some cases, then we probably also want to avoid flushing the snaps too since that involves the same locks. The second patch replaces the patch that I sent a few weeks ago to add a queue_inode_work helper. The last patch extends some work that Xiubo did earlier to allow skipping the caps check after putting references. It adds a new "flavor" when putting caps that instead has the inode work do the check or flush after the refcounts have been decremented. Jeff Layton (3): ceph: fix flush_snap logic after putting caps ceph: clean up inode work queueing ceph: allow queueing cap/snap handling after putting cap references fs/ceph/addr.c | 2 +- fs/ceph/caps.c | 36 +++++++++++++++++++++++------ fs/ceph/inode.c | 61 ++++++++++--------------------------------------- fs/ceph/super.h | 40 +++++++++++++++++++++++++++----- 4 files changed, 76 insertions(+), 63 deletions(-) -- 2.29.2