summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/store.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/store.c')
-rw-r--r--libglusterfs/src/store.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/store.c b/libglusterfs/src/store.c
index d6a64d2cdd3..d77b38be0ab 100644
--- a/libglusterfs/src/store.c
+++ b/libglusterfs/src/store.c
@@ -709,7 +709,12 @@ gf_store_unlock (gf_store_handle_t *sh)
GF_ASSERT (sh->locked == F_LOCK);
sh->locked = F_ULOCK;
- lockf (sh->fd, F_ULOCK, 0);
+
+ /* does not matter if this fails, locks are released on close anyway */
+ if (lockf (sh->fd, F_ULOCK, 0) == -1)
+ gf_log ("", GF_LOG_ERROR, "Failed to release lock on '%s': %s",
+ sh->path, strerror (errno));
+
close (sh->fd);
}