diff options
author | Rajesh Amaravathi <rajesh@redhat.com> | 2013-05-06 17:00:57 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-05-06 23:00:41 -0700 |
commit | d3e3a849ddce1ade85ddb885474b66299e98744d (patch) | |
tree | c84a950fd3b297f9b751357de2522498bb045fb2 /xlators | |
parent | 760d4e1d5836574239a13973003f4e5ec6f033a1 (diff) |
nfs: avoid double fd unref in opendir
Noticed that the fd_unref was called on the fd regardless of the return
value at nfs3svc_opendir_readdir_cbk(), hence removing an extra unref in
the negative case in nfs_inode_opendir_cbk, which fixes the spurious
fd_unref().
Change-Id: I2bf68410dd86cdf9cfe8a3d43adc27497d8bb36f
BUG: 959190
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4943
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/nfs/server/src/nfs-inodes.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xlators/nfs/server/src/nfs-inodes.c b/xlators/nfs/server/src/nfs-inodes.c index a68f8b227a4..291152f857e 100644 --- a/xlators/nfs/server/src/nfs-inodes.c +++ b/xlators/nfs/server/src/nfs-inodes.c @@ -572,9 +572,7 @@ nfs_inode_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, struct nfs_fop_local *nfl = NULL; fop_open_cbk_t progcbk = NULL; - if ((op_ret == -1) && (fd)) - fd_unref (fd); - else + if (op_ret != -1) fd_bind (fd); inodes_nfl_to_prog_data (nfl, progcbk, frame); |