summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2016-03-13 10:44:12 -0400
committerRaghavendra Bhat <raghavendra@redhat.com>2016-03-17 13:05:20 -0700
commit1eece065f1379bf08af839bae626ae701ccd91b0 (patch)
tree2bbcf51c96b4fab3adaf871765e2027a898ea086
parent9fbcf7f862df50925c3e2b83740c30ccd55e80dd (diff)
mount/fuse: cleanup an additional inode_ref()v3.7.9
commit ca515db0127 introduced a check in fuse_resolve_inode_simple(). This results in an additional ref being held on inodes which were obtained through readdirp. As a result, the inode table keeps growing and entries remain in the active list even after deletion of such inodes from the volume. Change-Id: I780ec5513990d6ef00ea051ec57ff20e4428081e BUG: 1317959 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/13745 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index 8ee64460401..6bde0b3c795 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -261,8 +261,11 @@ fuse_resolve_parent_simple (fuse_state_t *state)
* have been there even though it need not have (bug #804592).
*/
- if (loc->inode && inode_needs_lookup (loc->inode, THIS))
+ if (loc->inode && inode_needs_lookup (loc->inode, THIS)) {
+ inode_unref (loc->inode);
+ loc->inode = NULL;
return -1;
+ }
if ((loc->inode == NULL)
&& __is_root_gfid (parent->gfid)) {