From fbe70dcdd7c62ae97e04e09755dcf87d90fcad8b Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Tue, 17 Jan 2017 18:26:55 +0530 Subject: 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 Reviewed-on: https://review.gluster.org/16421 Reviewed-by: soumya k NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Niels de Vos --- xlators/nfs/server/src/nfs3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/nfs/server/src/nfs3.c') 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) -- cgit