summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2020-02-25 11:08:33 -0800
committerIlya Dryomov <idryomov@gmail.com>2020-03-30 12:42:41 +0200
commitc7e4f85ce9672470adee5c2f9ade1aa0d15d9334 (patch)
tree50abb51c3cdc0b8990cdc5cebda5381e8590a137 /fs/ceph
parente8a4d26771547cd690616bb204e0f350c4fa0e09 (diff)
downloadlinux-c7e4f85ce9672470adee5c2f9ade1aa0d15d9334.tar.bz2
ceph: more caps.c lockdep assertions
Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 9fa2f8777aa4..739c06611522 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);