summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-13 01:56:33 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-13 00:56:55 -0700
commit4f414b5c497541d8ab1ba8aa3edc38c2d468bc23 (patch)
tree46cf3b0c3c2846bfdf1c92d5c8931137260556e3 /xlators/protocol/client/src
parent16e313fba3830876410739113beb1f9ae5a9eade (diff)
protocol/client: send proper errno when op_ret is -1
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1353 (gnfs crash on nfs3_fill_create3res) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1353
Diffstat (limited to 'xlators/protocol/client/src')
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index db24630e711..cddfbcfc466 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -175,7 +175,7 @@ client3_1_mknod_cbk (struct rpc_req *req, struct iovec *iov, int count,
void *myframe)
{
call_frame_t *frame = NULL;
- gfs3_mknod_rsp rsp = {0,};
+ gfs3_mknod_rsp rsp = {0,};
struct iatt stbuf = {0,};
struct iatt preparent = {0,};
struct iatt postparent = {0,};
@@ -236,7 +236,7 @@ client3_1_mkdir_cbk (struct rpc_req *req, struct iovec *iov, int count,
void *myframe)
{
call_frame_t *frame = NULL;
- gfs3_mkdir_rsp rsp = {0,};
+ gfs3_mkdir_rsp rsp = {0,};
struct iatt stbuf = {0,};
struct iatt preparent = {0,};
struct iatt postparent = {0,};
@@ -745,7 +745,7 @@ client3_1_getxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
char *buf = NULL;
int dict_len = 0;
int op_ret = 0;
- int op_errno = 0;
+ int op_errno = EINVAL;
gfs3_getxattr_rsp rsp = {0,};
int ret = 0;
@@ -821,7 +821,7 @@ client3_1_fgetxattr_cbk (struct rpc_req *req, struct iovec *iov, int count,
int ret = 0;
int dict_len = 0;
int op_ret = 0;
- int op_errno = 0;
+ int op_errno = EINVAL;
frame = myframe;
@@ -1178,7 +1178,7 @@ client3_1_xattrop_cbk (struct rpc_req *req, struct iovec *iov, int count,
int ret = 0;
int op_ret = 0;
int dict_len = 0;
- int op_errno = 0;
+ int op_errno = EINVAL;
frame = myframe;
@@ -1863,7 +1863,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
gfs3_lookup_rsp rsp = {0,};
struct iatt stbuf = {0,};
struct iatt postparent = {0,};
- int op_errno = 0;
+ int op_errno = EINVAL;
ino_t oldino = 0;
uint64_t oldgen = 0;
dict_t *xattr = NULL;
@@ -1877,7 +1877,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
if (-1 == req->rpc_status) {
rsp.op_ret = -1;
- rsp.op_errno = ENOTCONN;
+ op_errno = ENOTCONN;
goto out;
}
@@ -1885,7 +1885,7 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
if (ret < 0) {
gf_log ("", GF_LOG_ERROR, "error");
rsp.op_ret = -1;
- rsp.op_errno = EINVAL;
+ op_errno = EINVAL;
goto out;
}