From 72324ef5e6a1749fbdb1944b2f088f58090f81b3 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Mon, 1 Sep 2014 14:07:15 +0200 Subject: Always check for ENODATA with ENOATTR Linux defines ENODATA and ENOATTR with the same value, which means that code can miss on on the two without breaking. FreeBSD does not have ENODATA and GlusterFS defines it as ENOATTR just like Linux does. On NetBSD, ENODATA != ENOATTR, hence we need to check for both values to get portable behavior. BUG: 764655 Change-Id: I003a3af055fdad285d235f2a0c192c9cce56fab8 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8447 Tested-by: Gluster Build System Reviewed-by: Niels de Vos --- xlators/mount/fuse/src/fuse-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mount/fuse/src') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index a50f0c8387f..dd51f5a6608 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3312,7 +3312,7 @@ fuse_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } /* if(state->name)...else */ } else { /* if failure - no need to check if listxattr or getxattr */ - if (op_errno != ENODATA) { + if (op_errno != ENODATA && op_errno != ENOATTR) { if (op_errno == ENOTSUP) { GF_LOG_OCCASIONALLY (gf_fuse_xattr_enotsup_log, "glusterfs-fuse", -- cgit