summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2017-04-04 15:50:29 +0530
committerRaghavendra Talur <rtalur@redhat.com>2017-04-27 10:46:45 +0000
commit12da472023f20ec0950d6a16125edd79e46812a0 (patch)
tree37aa330a91617daf1e312e9149e49aa56276c6c1 /api
parenteb1e3aebc152aa6ec2123376d479730185f3a031 (diff)
gfapi: Fix inode ref leak in anonymous fd I/O APIs
In the APIs to do I/Os using anonymous fd, there is a ref taken for inode which hasn't been unreferenced post the operation. This shall result in the leak. Cherry picked from commit 761e2dc0432d3723e0f8cbb1cf192ad386addb08: > Change-Id: I75ea952a6b2df58c385f4f53398e5562f255248d > BUG: 1438738 > Signed-off-by: Soumya Koduri <skoduri@redhat.com> > Reviewed-on: https://review.gluster.org/16989 > Reviewed-by: Prashanth Pai <ppai@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Change-Id: I75ea952a6b2df58c385f4f53398e5562f255248d BUG: 1435779 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/17074 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-fops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index ea61c8b7a43..a56c000f724 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -4528,6 +4528,9 @@ out:
if (fd)
fd_unref(fd);
+ if (inode)
+ inode_unref (inode);
+
glfs_subvol_done (fs, subvol);
__GLFS_EXIT_FS;
@@ -4596,6 +4599,9 @@ out:
if (fd)
fd_unref(fd);
+ if (inode)
+ inode_unref (inode);
+
glfs_subvol_done (fs, subvol);
__GLFS_EXIT_FS;