diff options
-rw-r--r-- | libglusterfs/src/fd.h | 3 | ||||
-rw-r--r-- | xlators/cluster/ec/src/ec-common.c | 5 |
2 files changed, 1 insertions, 7 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); diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index 009fad2f896..c32a28d2ed1 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -1304,10 +1304,7 @@ ec_lock_update_fd(ec_lock_t *lock, ec_fop_data_t *fop) { /* If the fop has an fd available, attach it to the lock structure to be * able to do fxattrop calls instead of xattrop. */ - if (fop->use_fd) { - if (lock->fd != NULL) { - __fd_unref(lock->fd); - } + if (fop->use_fd && (lock->fd == NULL)) { lock->fd = __fd_ref(fop->fd); } } |