From: Jeff Layton Date: Tue, 25 Feb 2020 19:08:33 +0000 (-0800) Subject: ceph: more caps.c lockdep assertions X-Git-Tag: v5.7-rc1~39^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7e4f85ce9672470adee5c2f9ade1aa0d15d9334;p=thirdparty%2Fkernel%2Flinux.git ceph: more caps.c lockdep assertions Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 9fa2f8777aa4b..739c06611522b 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1634,6 +1634,8 @@ int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask, int was = ci->i_dirty_caps; int dirty = 0; + lockdep_assert_held(&ci->i_ceph_lock); + if (!ci->i_auth_cap) { pr_warn("__mark_dirty_caps %p %llx mask %s, " "but no auth cap (session was closed?)\n", @@ -1743,6 +1745,7 @@ static u64 __mark_caps_flushing(struct inode *inode, struct ceph_cap_flush *cf = NULL; int flushing; + lockdep_assert_held(&ci->i_ceph_lock); BUG_ON(ci->i_dirty_caps == 0); BUG_ON(list_empty(&ci->i_dirty_item)); BUG_ON(!ci->i_prealloc_cap_flush);