Patchwork [BUG:1464,TAKE-2] nfs3: Do not unref dst inode on rename cbk

login
register
Submitter Shehjar Tikoo
Date 2010-09-02 10:35:57
Message ID <1283423757-27309-1-git-send-email-shehjart@gluster.com>
Download mbox | patch
Permalink /patch/4478/
State Accepted
Headers show

Comments

Shehjar Tikoo - 2010-09-02 10:35:57
From: Shehjar Tikoo <shehjart@gluster.com>

This gets done when the call state gets wiped. Doing it here results
an extra unref causing a segfault.

Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
---
 xlators/nfs/server/src/nfs3.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

Patch

diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 16a5e65..67ad662 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -3281,12 +3281,6 @@  nfs3svc_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
                 nfs3_fdcache_remove (cs->nfs3state, openfd);
         }
 
-        /* This is the unref equivalent of the ref done when the inode was
-         * created on a lookup or a create request.
-         * The inode is finally unrefed in call state wipe.
-         */
-        inode_unref (cs->resolvedloc.inode);
-
 nfs3err:
         nfs3_log_common_res (nfs_rpcsvc_request_xid (cs->req), "RENAME", stat,
                              -ret);