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 2e93f76988a..f4a8c444198 100644 --- a/libglusterfs/src/fd.h +++ b/libglusterfs/src/fd.h @@ -121,9 +121,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 58cfc732ced..d1cdda85b2c 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);      }  }  | 
