summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2010-05-26 03:32:03 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-26 04:40:13 -0700
commit1d363d4b7dd5b4dc25892053259ff43f1b4c52c7 (patch)
treeb47b21e57b9e2ed2e6496e1ec467a2bb435d5093
parent02518836297c9428f79bda1c2dfc6dde7c008069 (diff)
Set op_ret to -1 when open fails in posix_open
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 935 (Directories change mode from 0755 to 0644 automatically) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=935
-rw-r--r--xlators/storage/posix/src/posix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 0c7890f..0b7ab19 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -2363,6 +2363,7 @@ posix_open (call_frame_t *frame, xlator_t *this,
_fd = open (real_path, flags, 0);
if (_fd == -1) {
op_errno = errno;
+ op_ret = -1;
gf_log (this->name, GF_LOG_ERROR,
"open on %s: %s", real_path, strerror (op_errno));
goto out;