diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-22 10:15:58 +0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-11-23 11:00:59 -0800 |
commit | a096b09aeec6ff99edfdfd8cee24d6f25377d585 (patch) | |
tree | d32a4a15cd391c2c84205c855e7d997070279cc6 /fs/ceph/mds_client.c | |
parent | 81c6aea5275eae453719d7f3924da07e668265c5 (diff) | |
download | blackbird-op-linux-a096b09aeec6ff99edfdfd8cee24d6f25377d585.tar.gz blackbird-op-linux-a096b09aeec6ff99edfdfd8cee24d6f25377d585.zip |
ceph: queue cap release in __ceph_remove_cap()
call __queue_cap_release() in __ceph_remove_cap(), this avoids
acquiring s_cap_lock twice.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index f51ab2627b41..8f8f5c043c37 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -986,7 +986,7 @@ static int remove_session_caps_cb(struct inode *inode, struct ceph_cap *cap, dout("removing cap %p, ci is %p, inode is %p\n", cap, ci, &ci->vfs_inode); spin_lock(&ci->i_ceph_lock); - __ceph_remove_cap(cap); + __ceph_remove_cap(cap, false); if (!__ceph_is_any_real_caps(ci)) { struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; @@ -1231,9 +1231,7 @@ static int trim_caps_cb(struct inode *inode, struct ceph_cap *cap, void *arg) session->s_trim_caps--; if (oissued) { /* we aren't the only cap.. just remove us */ - __queue_cap_release(session, ceph_ino(inode), cap->cap_id, - cap->mseq, cap->issue_seq); - __ceph_remove_cap(cap); + __ceph_remove_cap(cap, true); } else { /* try to drop referring dentries */ spin_unlock(&ci->i_ceph_lock); |