Commit c7e4f85c authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: more caps.c lockdep assertions

Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent e8a4d267
...@@ -1634,6 +1634,8 @@ int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask, ...@@ -1634,6 +1634,8 @@ int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask,
int was = ci->i_dirty_caps; int was = ci->i_dirty_caps;
int dirty = 0; int dirty = 0;
lockdep_assert_held(&ci->i_ceph_lock);
if (!ci->i_auth_cap) { if (!ci->i_auth_cap) {
pr_warn("__mark_dirty_caps %p %llx mask %s, " pr_warn("__mark_dirty_caps %p %llx mask %s, "
"but no auth cap (session was closed?)\n", "but no auth cap (session was closed?)\n",
...@@ -1743,6 +1745,7 @@ static u64 __mark_caps_flushing(struct inode *inode, ...@@ -1743,6 +1745,7 @@ static u64 __mark_caps_flushing(struct inode *inode,
struct ceph_cap_flush *cf = NULL; struct ceph_cap_flush *cf = NULL;
int flushing; int flushing;
lockdep_assert_held(&ci->i_ceph_lock);
BUG_ON(ci->i_dirty_caps == 0); BUG_ON(ci->i_dirty_caps == 0);
BUG_ON(list_empty(&ci->i_dirty_item)); BUG_ON(list_empty(&ci->i_dirty_item));
BUG_ON(!ci->i_prealloc_cap_flush); BUG_ON(!ci->i_prealloc_cap_flush);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment