summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@redhat.com>2017-01-17 18:26:55 +0530
committerNiels de Vos <ndevos@redhat.com>2017-01-30 06:51:51 -0500
commitfbe70dcdd7c62ae97e04e09755dcf87d90fcad8b (patch)
treed21c7728cba9eea828e84bed8676b4a2a6172d8e /xlators/nfs/server
parent355c1955039a39c820880be72fe77d4e74af0967 (diff)
gNFS : pass proper gfid for nfs_setattr() in nfs3svc_create_cbk()
The nfs3svc_create_cbk() takes "gfid" from inode variable which it received, not from inode which it performed linking to nfs_setattr(). There is possiblity that the inode passed into this function holds NULL gfid if there are some parallel operation happening on the same file. Similar issue is mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1413971 Thanks pranith for proposing the fix Change-Id: I1a0ff4f02b483416f19f4f064c306c2cad5d9d8b BUG: 1413971 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: https://review.gluster.org/16421 Reviewed-by: soumya k <skoduri@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/nfs/server')
-rw-r--r--xlators/nfs/server/src/nfs3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index ffcba8f2c30..2042d4e369c 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -2456,7 +2456,7 @@ nfs3svc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
cs->preparent = *preparent;
cs->postparent = *postparent;
nfs_request_user_init (&nfu, cs->req);
- gf_uuid_copy (cs->resolvedloc.gfid, inode->gfid);
+ gf_uuid_copy (cs->resolvedloc.gfid, oldinode->gfid);
ret = nfs_setattr (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,&cs->stbuf,
cs->setattr_valid, nfs3svc_create_setattr_cbk, cs);
if (ret < 0)