From 1eece065f1379bf08af839bae626ae701ccd91b0 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sun, 13 Mar 2016 10:44:12 -0400 Subject: mount/fuse: cleanup an additional inode_ref() 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 Reviewed-on: http://review.gluster.org/13745 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Raghavendra Bhat --- xlators/mount/fuse/src/fuse-resolve.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) { -- cgit