The snaprealm handling code has a number of really old and misleading comments that claim that we need certain locks when holding certain functions. Some of them are wrong, and at least one caller is not holding the snap_rwsem when filling an inode. The first patch in this series adds some lockdep annotations that mirror the comments. The second one relaxes the lockdep annotations for a couple of the functions to better conform with the real requirements of the code. The last patch then fixes a bug in async create code and ensures that we're holding the correct locks when filling a new inode. Jeff Layton (3): ceph: add some lockdep assertions around snaprealm handling ceph: clean up locking annotation for ceph_get_snap_realm and __lookup_snap_realm ceph: must hold snap_rwsem when filling inode for async create fs/ceph/file.c | 3 +++ fs/ceph/inode.c | 2 ++ fs/ceph/snap.c | 20 ++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) -- 2.31.1