summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-02-16 17:48:44 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-16 21:56:30 -0800
commit4cc4e47f6cad1127ad425cc0ab10bc42ab1411c8 (patch)
tree551513ea3e7698ee36bb023e42adbe23c01addbe /xlators
parentb19719d037f32a5af109bc474afda2230a0a2403 (diff)
storage/posix: reset op_ret to -1 after call to MAKE_INODE_HANDLE
MAKE_INODE_HANDLE uses op_ret. We do not reset it to -1, and in few instances we jump to label out, where we unwind with op_ret. Change-Id: Iac4d9f250f5253b3ce0cd91cc385168247efd4a8 BUG: 788998 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2759 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/storage/posix/src/posix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 7a66cd8c83e..24dd536e4b4 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -565,6 +565,7 @@ posix_opendir (call_frame_t *frame, xlator_t *this,
SET_FS_ID (frame->root->uid, frame->root->gid);
MAKE_INODE_HANDLE (real_path, this, loc, NULL);
+ op_ret = -1;
dir = opendir (real_path);
if (dir == NULL) {
@@ -1762,6 +1763,7 @@ posix_open (call_frame_t *frame, xlator_t *this,
MAKE_INODE_HANDLE (real_path, this, loc, &stbuf);
+ op_ret = -1;
SET_FS_ID (frame->root->uid, frame->root->gid);
if (priv->o_direct)
@@ -2323,6 +2325,7 @@ posix_setxattr (call_frame_t *frame, xlator_t *this,
MAKE_INODE_HANDLE (real_path, this, loc, NULL);
+ op_ret = -1;
dict_del (dict, GFID_XATTR_KEY);
trav = dict->members_list;
@@ -2379,6 +2382,7 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,
SET_FS_ID (frame->root->uid, frame->root->gid);
MAKE_INODE_HANDLE (real_path, this, loc, NULL);
+ op_ret = -1;
priv = this->private;
if (loc->inode && IA_ISDIR(loc->inode->ia_type) && name &&
@@ -2761,6 +2765,7 @@ posix_removexattr (call_frame_t *frame, xlator_t *this,
if (!strcmp (GFID_XATTR_KEY, name)) {
gf_log (this->name, GF_LOG_WARNING, "Remove xattr called"
" on gfid for file %s", real_path);
+ op_ret = -1;
goto out;
}