summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2018-05-05 20:23:32 +0200
committerShyamsundar Ranganathan <srangana@redhat.com>2018-05-06 11:24:34 +0000
commita6490fe02174d344f4ed81fa3bc6c0b5933f4faf (patch)
tree7c7c08d5b8e99da2fab534610b66c7d2e4bc3380 /api
parent9e739aef97bedfd30e401575ffb6a67e53eec16f (diff)
gfapi: acutally avoid recall callback when closedv4.2dev
Due to missing curly braces we end up calling the callback function even when state is GLFD_CLOSE. This patch adds the curly braces so both the log and actual callback is skipped. Introduced in 19568 in commit b04066721bf4a240f61b83bd87bbb27437c5fe4f Change-Id: I0b15cfe222841cfcb12f17723284acb3838d64d7 fixes: bz#1575294 Signed-off-by: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs-fops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index 66b764dd0da..a3e5afaf627 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -5180,11 +5180,12 @@ glfs_recall_lease_fd (struct glfs *fs,
list_for_each_entry_safe (glfd, tmp, &glfd_list, list) {
LOCK (&glfd->lock);
{
- if (glfd->state != GLFD_CLOSE)
+ if (glfd->state != GLFD_CLOSE) {
gf_msg_trace (THIS->name, 0,
"glfd (%p) has held lease, "
"calling recall cbk", glfd);
glfd->cbk (lease, glfd->cookie);
+ }
}
UNLOCK (&glfd->lock);