diff options
author | Jeff Layton <jlayton@kernel.org> | 2019-07-19 09:41:02 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-09-16 12:06:24 +0200 |
commit | 354c63a0033f1ad4bcb208e796f997bfaf946e6d (patch) | |
tree | 8b17f0b9468b1a2b1bba800cf6d5a211ac573fb9 /fs/ceph | |
parent | 533a2818dd1a00cdd32d638fea0178e25a683053 (diff) | |
download | linux-354c63a0033f1ad4bcb208e796f997bfaf946e6d.tar.bz2 |
ceph: fix comments over ceph_add_cap
We actually need the ci->i_ceph_lock here. The necessity of the s_mutex
is less clear. Also add a lockdep assertion for the i_ceph_lock.
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index bdfec8978479..2563f42445e6 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -597,7 +597,7 @@ static void __check_cap_issue(struct ceph_inode_info *ci, struct ceph_cap *cap, /* * Add a capability under the given MDS session. * - * Caller should hold session snap_rwsem (read) and s_mutex. + * Caller should hold session snap_rwsem (read) and ci->i_ceph_lock * * @fmode is the open file mode, if we are opening a file, otherwise * it is < 0. (This is so we can atomically add the cap and add an @@ -616,6 +616,8 @@ void ceph_add_cap(struct inode *inode, int actual_wanted; u32 gen; + lockdep_assert_held(&ci->i_ceph_lock); + dout("add_cap %p mds%d cap %llx %s seq %d\n", inode, session->s_mds, cap_id, ceph_cap_string(issued), seq); |