Skip to contentSkip to conversation

Ceph: Remove useless variable revoked_rdcache

PATCH In review Li Wang 2 participants 2 messages Aug 15, 2013 – Aug 16, 2013 Ceph client

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH 1/1 Ceph: Remove useless variable revoked_rdcache

Cleanup in handle_cap_grant()

---
 fs/ceph/caps.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/ceph/caps.c +1 -4
index 25442b4..8c90cae 100644
@@ -2361,7 +2361,6 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
 	int check_caps = 0;
 	int wake = 0;
 	int writeback = 0;
-	int revoked_rdcache = 0;
 	int queue_invalidate = 0;
 
 	dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",
@@ -2377,9 +2376,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
 	if (((cap->issued & ~newcaps) & CEPH_CAP_FILE_CACHE) &&
 	    (newcaps & CEPH_CAP_FILE_LAZYIO) == 0 &&
 	    !ci->i_wrbuffer_ref) {
-		if (try_nonblocking_invalidate(inode) == 0) {
-			revoked_rdcache = 1;
-		} else {
+		if (try_nonblocking_invalidate(inode)) {
 			/* there were locked pages.. invalidate later
 			   in a separate thread. */
 			if (ci->i_rdcache_revoking != ci->i_rdcache_gen) {
Signature · 1 line
1.7.9.5
#1 lore raw

Applied to testing branch, Thanks!

sage

Quoted 34 lines · Li Wang

Cleanup in handle_cap_grant()

---
 fs/ceph/caps.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/ceph/caps.c +1 -4
index 25442b4..8c90cae 100644
@@ -2361,7 +2361,6 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
 	int check_caps = 0;
 	int wake = 0;
 	int writeback = 0;
-	int revoked_rdcache = 0;
 	int queue_invalidate = 0;
 
 	dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",
@@ -2377,9 +2376,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
 	if (((cap->issued & ~newcaps) & CEPH_CAP_FILE_CACHE) &&
 	    (newcaps & CEPH_CAP_FILE_LAZYIO) == 0 &&
 	    !ci->i_wrbuffer_ref) {
-		if (try_nonblocking_invalidate(inode) == 0) {
-			revoked_rdcache = 1;
-		} else {
+		if (try_nonblocking_invalidate(inode)) {
 			/* there were locked pages.. invalidate later
 			   in a separate thread. */
 			if (ci->i_rdcache_revoking != ci->i_rdcache_gen) {
Signature · 1 line
1.7.9.5