summaryrefslogtreecommitdiffstats
path: root/fs/ceph/export.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-27 09:24:26 -0700
committerSage Weil <sage@newdream.net>2011-06-07 21:34:11 -0700
commit70b666c3b4cb2b96098d80e6f515e4bc6d37db5a (patch)
treedd82036114adf9d0c28120500d58833cacfbc004 /fs/ceph/export.c
parentdb3540522e955c1ebb391f4f5324dff4f20ecd09 (diff)
downloadlinux-70b666c3b4cb2b96098d80e6f515e4bc6d37db5a.tar.bz2
ceph: use ihold when we already have an inode ref
We should use ihold whenever we already have a stable inode ref, even when we aren't holding i_lock. This avoids adding new and unnecessary locking dependencies. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/export.c')
-rw-r--r--fs/ceph/export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/export.c b/fs/ceph/export.c
index a610d3d67488..f67b687550de 100644
--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
@@ -109,7 +109,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,
err = ceph_mdsc_do_request(mdsc, NULL, req);
inode = req->r_target_inode;
if (inode)
- igrab(inode);
+ ihold(inode);
ceph_mdsc_put_request(req);
if (!inode)
return ERR_PTR(-ESTALE);
@@ -167,7 +167,7 @@ static struct dentry *__cfh_to_dentry(struct super_block *sb,
err = ceph_mdsc_do_request(mdsc, NULL, req);
inode = req->r_target_inode;
if (inode)
- igrab(inode);
+ ihold(inode);
ceph_mdsc_put_request(req);
if (!inode)
return ERR_PTR(err ? err : -ESTALE);