summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-09-01 14:07:15 +0200
committerVijay Bellur <vbellur@redhat.com>2014-09-08 02:06:52 -0700
commit72324ef5e6a1749fbdb1944b2f088f58090f81b3 (patch)
tree17a70306319cde7b86474b3e5c3781b96693a9aa /xlators/features
parent165cf459cf2a61c391d16928d58b34543a7ec94e (diff)
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 <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8447 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/marker/src/marker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index e9a8e544b3b..465ee8c7ce6 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1130,7 +1130,7 @@ marker_rename_release_oldp_lock (call_frame_t *frame, void *cookie,
local = frame->local;
oplocal = local->oplocal;
- if ((op_ret < 0) && (op_errno != ENOATTR)) {
+ if ((op_ret < 0) && (op_errno != ENOATTR) && (op_errno != ENODATA)) {
local->err = op_errno;
}
@@ -1275,7 +1275,7 @@ marker_do_rename (call_frame_t *frame, void *cookie, xlator_t *this,
if (cookie == (void *) _GF_UID_GID_CHANGED)
MARKER_RESET_UID_GID (frame, frame->root, local);
- if ((op_ret < 0) && (op_errno != ENOATTR)) {
+ if ((op_ret < 0) && (op_errno != ENOATTR) && (op_errno != ENODATA)) {
local->err = op_errno ? op_errno : EINVAL;
gf_log (this->name, GF_LOG_WARNING,
"fetching contribution values from %s (gfid:%s) "
@@ -1327,7 +1327,7 @@ marker_get_newpath_contribution (call_frame_t *frame, void *cookie,
if (cookie == (void *) _GF_UID_GID_CHANGED)
MARKER_RESET_UID_GID (frame, frame->root, local);
- if ((op_ret < 0) && (op_errno != ENOATTR)) {
+ if ((op_ret < 0) && (op_errno != ENOATTR) && (op_errno != ENODATA)) {
local->err = op_errno ? op_errno : EINVAL;
gf_log (this->name, GF_LOG_WARNING,
"fetching contribution values from %s (gfid:%s) "