From a6490fe02174d344f4ed81fa3bc6c0b5933f4faf Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Sat, 5 May 2018 20:23:32 +0200 Subject: gfapi: acutally avoid recall callback when closed 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 --- api/src/glfs-fops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit