summaryrefslogtreecommitdiff
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-02-19 00:12:21 (GMT)
committerSage Weil <sage@newdream.net>2010-02-19 22:41:10 (GMT)
commitbcd2cbd10ce31c950a40c08d7f601f8ff23537b8 (patch)
tree1f419714feceb6072828cc8977610cfcadec1705 /fs/ceph/caps.c
parentc9af9fb68e01eb2c2165e1bc45cfeeed510c64e6 (diff)
downloadlinux-fsl-qoriq-bcd2cbd10ce31c950a40c08d7f601f8ff23537b8.tar.xz
ceph: cleanup redundant code in handle_cap_grant
There is no state in local vars that requires us to loop after temporarily dropping i_lock. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index e1e6df0..289f6c6 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2210,7 +2210,6 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
int writeback = 0;
int revoked_rdcache = 0;
int queue_invalidate = 0;
- int tried_invalidate = 0;
dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",
inode, cap, mds, seq, ceph_cap_string(newcaps));
@@ -2222,10 +2221,8 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
* try to invalidate (once). (If there are dirty buffers, we
* will invalidate _after_ writeback.)
*/
-restart:
if (((cap->issued & ~newcaps) & CEPH_CAP_FILE_CACHE) &&
- !ci->i_wrbuffer_ref && !tried_invalidate) {
- tried_invalidate = 1;
+ !ci->i_wrbuffer_ref) {
if (try_nonblocking_invalidate(inode) == 0) {
revoked_rdcache = 1;
} else {
@@ -2236,7 +2233,6 @@ restart:
ci->i_rdcache_revoking = ci->i_rdcache_gen;
}
}
- goto restart;
}
/* side effects now are allowed */