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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user