]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ceph: more caps.c lockdep assertions
authorJeff Layton <jlayton@kernel.org>
Tue, 25 Feb 2020 19:08:33 +0000 (11:08 -0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 30 Mar 2020 10:42:41 +0000 (12:42 +0200)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c

index 9fa2f8777aa4bd550979a16dd9bff54b60911567..739c06611522b8111fc0f6a330a9ff6182bf2f99 100644 (file)
@@ -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);