diff options
author | Sage Weil <sage@newdream.net> | 2011-05-27 12:24:26 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-06-08 00:34:11 -0400 |
commit | 70b666c3b4cb2b96098d80e6f515e4bc6d37db5a (patch) | |
tree | dd82036114adf9d0c28120500d58833cacfbc004 /fs/ceph/locks.c | |
parent | db3540522e955c1ebb391f4f5324dff4f20ecd09 (diff) |
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/locks.c')
-rw-r--r-- | fs/ceph/locks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c index 476b329867d4..7f0f72c53f7e 100644 --- a/fs/ceph/locks.c +++ b/fs/ceph/locks.c | |||
@@ -23,7 +23,8 @@ static int ceph_lock_message(u8 lock_type, u16 operation, struct file *file, | |||
23 | req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); | 23 | req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); |
24 | if (IS_ERR(req)) | 24 | if (IS_ERR(req)) |
25 | return PTR_ERR(req); | 25 | return PTR_ERR(req); |
26 | req->r_inode = igrab(inode); | 26 | req->r_inode = inode; |
27 | ihold(inode); | ||
27 | 28 | ||
28 | /* mds requires start and length rather than start and end */ | 29 | /* mds requires start and length rather than start and end */ |
29 | if (LLONG_MAX == fl->fl_end) | 30 | if (LLONG_MAX == fl->fl_end) |