mount/fuse: do not forget the root inode

In batch forgetting of inodes, nodeid should be checked and if it is for
root, then it should not be sent forget.

Change-Id: I99bd91ba70d8be4df88ddac005e38c449f4ed7d9
BUG: 990744
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/5471
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
This commit is contained in:
Raghavendra Bhat 2013-08-02 16:00:28 +05:30 committed by Anand Avati
parent 094b06c520
commit f4cffcc7ef

View File

@ -586,8 +586,11 @@ fuse_batch_forget(xlator_t *this, fuse_in_header_t *finh, void *msg)
"%"PRIu64": BATCH_FORGET %"PRIu64"/%"PRIu32,
finh->unique, finh->nodeid, fbfi->count);
for (i = 0; i < fbfi->count; i++)
for (i = 0; i < fbfi->count; i++) {
if (ffo[i].nodeid == 1)
continue;
do_forget(this, finh->unique, ffo[i].nodeid, ffo[i].nlookup);
}
GF_FREE(finh);
}