From 1d363d4b7dd5b4dc25892053259ff43f1b4c52c7 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 26 May 2010 03:32:03 +0000 Subject: Set op_ret to -1 when open fails in posix_open Signed-off-by: Raghavendra Bhat Signed-off-by: Anand V. Avati BUG: 935 (Directories change mode from 0755 to 0644 automatically) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=935 --- xlators/storage/posix/src/posix.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit