summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/fd.h
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2016-06-09 17:29:26 +0200
committerJeff Darcy <jdarcy@redhat.com>2016-06-13 05:14:38 -0700
commite0b057cf28abc534f1fc74f4ea921c78a52ab6fe (patch)
tree45cbdeef7d2f25b9ca2d55ab9cb00536e8b141e1 /libglusterfs/src/fd.h
parent40a7537556a7eb0a7c90ec6e7e2fd4014beae092 (diff)
cluster/ec: Fix invalid __fd_unref() call
__fd_unref() doesn't do any cleanup, so it cannot be called to release fd references, specially if it's the last reference. The code has been changed to avoid a call to this function. In the previous version we always tried to keep the newest fd in the ec_lock_t structure. However this is not necessary. We'll always keep one reference to an open file on the same inode. It's irrelevant if the reference is new or old. The function __fd_unref() has also been removed from fd.h to avoid being used in the future since it's useless as it's defined now. Change-Id: Ia728777fc8e464758d5ea4d3bf020f0603919039 BUG: 1344396 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14683 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ashish Pandey <aspandey@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'libglusterfs/src/fd.h')
-rw-r--r--libglusterfs/src/fd.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h
index 322cac7dd1f..31f494a7e8f 100644
--- a/libglusterfs/src/fd.h
+++ b/libglusterfs/src/fd.h
@@ -116,9 +116,6 @@ fd_t *
fd_ref (fd_t *fd);
-fd_t *
-__fd_unref (fd_t *fd);
-
void
fd_unref (fd_t *fd);