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