17b94a
From 3612b3a46c33d19bb7d4aee6eb6625d8d903d459 Mon Sep 17 00:00:00 2001
17b94a
From: Pranith Kumar K <pkarampu@redhat.com>
17b94a
Date: Wed, 17 Jun 2020 10:44:37 +0530
17b94a
Subject: [PATCH 474/478] features/locks: posixlk-clear-lock should set error
17b94a
 as EINTR
17b94a
17b94a
Problem:
17b94a
fuse on receiving interrupt for setlk sends clear-lock "fop"
17b94a
using virtual-getxattr. At the moment blocked locks which are
17b94a
cleared return EAGAIN errno as opposed to EINTR errno
17b94a
17b94a
Fix:
17b94a
Return EINTR errno.
17b94a
17b94a
Upstream:
17b94a
> Reviewed-on: https://review.gluster.org/24587
17b94a
> Updates: #1310
17b94a
> Change-Id: I47de0fcaec370b267f2f5f89deeb37e1b9c0ee9b
17b94a
> Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
17b94a
17b94a
BUG: 1821743
17b94a
Change-Id: Id8301ce6e21c009949e88db5904d8b6ecc278f66
17b94a
Signed-off-by: Csaba Henk <csaba@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/216157
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
17b94a
---
17b94a
 xlators/features/locks/src/clear.c | 4 ++--
17b94a
 1 file changed, 2 insertions(+), 2 deletions(-)
17b94a
17b94a
diff --git a/xlators/features/locks/src/clear.c b/xlators/features/locks/src/clear.c
17b94a
index 116aed6..ab1eac6 100644
17b94a
--- a/xlators/features/locks/src/clear.c
17b94a
+++ b/xlators/features/locks/src/clear.c
17b94a
@@ -181,9 +181,9 @@ clrlk_clear_posixlk(xlator_t *this, pl_inode_t *pl_inode, clrlk_args *args,
17b94a
             if (plock->blocked) {
17b94a
                 bcount++;
17b94a
                 pl_trace_out(this, plock->frame, NULL, NULL, F_SETLKW,
17b94a
-                             &plock->user_flock, -1, EAGAIN, NULL);
17b94a
+                             &plock->user_flock, -1, EINTR, NULL);
17b94a
 
17b94a
-                STACK_UNWIND_STRICT(lk, plock->frame, -1, EAGAIN,
17b94a
+                STACK_UNWIND_STRICT(lk, plock->frame, -1, EINTR,
17b94a
                                     &plock->user_flock, NULL);
17b94a
 
17b94a
             } else {
17b94a
-- 
17b94a
1.8.3.1
17b94a