summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-helpers.c
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-02-05 16:04:50 -0800
committerAnand Avati <avati@redhat.com>2013-02-07 10:26:27 -0800
commit78ae7215614a7717d2cf838afefb1525fbb70602 (patch)
tree55434bfd663d5e725d9c62097a644c9c153e90d1 /xlators/mount/fuse/src/fuse-helpers.c
parentda9d54cac629d9c0f7ae6b431abfb134b5f0eca3 (diff)
fuse-bridge: use READDIRPLUS support when available
This patch makes use of READDIRPLUS call when support is available in the kernel. Change-Id: Iac78881179567856b55af1f46594a2b2859309f0 BUG: 908128 Signed-off-by: Anand V. Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3905 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-helpers.c')
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index e72669a9e99..d4dcc2e61bd 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -339,7 +339,9 @@ fuse_ino_to_inode (uint64_t ino, xlator_t *fuse)
uint64_t
inode_to_fuse_nodeid (inode_t *inode)
{
- if (!inode || __is_root_gfid (inode->gfid))
+ if (!inode)
+ return 0;
+ if (__is_root_gfid (inode->gfid))
return 1;
return (unsigned long) inode;