mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ocfs2: refactor the noqueue_attempted
@ 2022-03-19  6:10 Yi Li
  2022-03-20 13:40 ` Joseph Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Yi Li @ 2022-03-19  6:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: yilikernel, joseph.qi, jlbec, mark, ocfs2-devel, Yi Li

The variable noqueue_attempted just set when DLM_LKF_NOQUEUE.
refactor the code.

Signed-off-by: Yi Li <yili@winhong.com>
---
 fs/ocfs2/dlmglue.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 801e60bab955..6315757c164d 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -1547,12 +1547,11 @@ static int __ocfs2_cluster_lock(struct ocfs2_super *osb,
 	}
 
 	if (level > lockres->l_level) {
-		if (noqueue_attempted > 0) {
+		if (noqueue_attempted) {
 			ret = -EAGAIN;
 			goto unlock;
 		}
-		if (lkm_flags & DLM_LKF_NOQUEUE)
-			noqueue_attempted = 1;
+		noqueue_attempted = lkm_flags & DLM_LKF_NOQUEUE;
 
 		if (lockres->l_action != OCFS2_AST_INVALID)
 			mlog(ML_ERROR, "lockres %s has action %u pending\n",
-- 
2.25.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-20 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19  6:10 [PATCH] ocfs2: refactor the noqueue_attempted Yi Li
2022-03-20 13:40 ` Joseph Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®