diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-05-26 03:32:03 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-05-26 04:40:13 -0700 |
commit | 1d363d4b7dd5b4dc25892053259ff43f1b4c52c7 (patch) | |
tree | b47b21e57b9e2ed2e6496e1ec467a2bb435d5093 | |
parent | 02518836297c9428f79bda1c2dfc6dde7c008069 (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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 0c7890f611b..0b7ab190c33 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; |