aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-03 12:28:08 -0400
committerSage Weil <sage@newdream.net>2011-05-03 12:28:08 -0400
commit3772d26d87efc2d91b2e4247e0001c89ed09a980 (patch)
tree940dc54f9daeef06185bcab96e2fc01c54a13355 /fs/ceph
parenta1b49cb7e2a7961ec3aa8b64860bf480d4ec9077 (diff)
ceph: use ihold() when i_lock is held
See 0444d76ae64fffc7851797fc1b6ebdbb44ac504a. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/caps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 5323c330bbf3..010ba9c52e9b 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1357,7 +1357,7 @@ void __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask)
1357 list_add(&ci->i_dirty_item, &mdsc->cap_dirty); 1357 list_add(&ci->i_dirty_item, &mdsc->cap_dirty);
1358 spin_unlock(&mdsc->cap_dirty_lock); 1358 spin_unlock(&mdsc->cap_dirty_lock);
1359 if (ci->i_flushing_caps == 0) { 1359 if (ci->i_flushing_caps == 0) {
1360 igrab(inode); 1360 ihold(inode);
1361 dirty |= I_DIRTY_SYNC; 1361 dirty |= I_DIRTY_SYNC;
1362 } 1362 }
1363 } 1363 }
@@ -1991,7 +1991,7 @@ static void __take_cap_refs(struct ceph_inode_info *ci, int got)
1991 ci->i_wr_ref++; 1991 ci->i_wr_ref++;
1992 if (got & CEPH_CAP_FILE_BUFFER) { 1992 if (got & CEPH_CAP_FILE_BUFFER) {
1993 if (ci->i_wrbuffer_ref == 0) 1993 if (ci->i_wrbuffer_ref == 0)
1994 igrab(&ci->vfs_inode); 1994 ihold(&ci->vfs_inode);
1995 ci->i_wrbuffer_ref++; 1995 ci->i_wrbuffer_ref++;
1996 dout("__take_cap_refs %p wrbuffer %d -> %d (?)\n", 1996 dout("__take_cap_refs %p wrbuffer %d -> %d (?)\n",
1997 &ci->vfs_inode, ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref); 1997 &ci->vfs_inode, ci->i_wrbuffer_ref-1, ci->i_wrbuffer_ref);