summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/reservelk.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/locks/src/reservelk.c')
-rw-r--r--xlators/features/locks/src/reservelk.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/xlators/features/locks/src/reservelk.c b/xlators/features/locks/src/reservelk.c
index 8eb08d0ef79..13b23f9f887 100644
--- a/xlators/features/locks/src/reservelk.c
+++ b/xlators/features/locks/src/reservelk.c
@@ -18,18 +18,6 @@
#include "locks.h"
#include "common.h"
-void
-__delete_reserve_lock (posix_lock_t *lock)
-{
- list_del (&lock->list);
-}
-
-void
-__destroy_reserve_lock (posix_lock_t *lock)
-{
- GF_FREE (lock);
-}
-
/* Return true if the two reservelks have exactly same lock boundaries */
int
reservelks_equal (posix_lock_t *l1, posix_lock_t *l2)
@@ -110,7 +98,7 @@ __reservelk_conflict (xlator_t *this, pl_inode_t *pl_inode,
list_del_init (&conf->list);
gf_log (this->name, GF_LOG_TRACE,
"Removing the matching reservelk for setlk to progress");
- GF_FREE (conf);
+ __destroy_lock(conf);
ret = 0;
} else {
gf_log (this->name, GF_LOG_TRACE,
@@ -217,7 +205,7 @@ __reserve_unlock_lock (xlator_t *this, posix_lock_t *lock, pl_inode_t *pl_inode)
" Matching lock not found for unlock");
goto out;
}
- __delete_reserve_lock (conf);
+ __delete_lock(conf);
gf_log (this->name, GF_LOG_DEBUG,
" Matching lock found for unlock");
@@ -392,7 +380,7 @@ pl_reserve_unlock (xlator_t *this, pl_inode_t *pl_inode, posix_lock_t *lock)
gf_log (this->name, GF_LOG_TRACE,
"Reservelk Unlock successful");
- __destroy_reserve_lock (retlock);
+ __destroy_lock(retlock);
ret = 0;
}
out: