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