lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 19 Mar 2022 14:10:28 +0800
From:   Yi Li <yili@...hong.com>
To:     linux-kernel@...r.kernel.org
Cc:     yilikernel@...il.com, joseph.qi@...ux.alibaba.com,
        jlbec@...lplan.org, mark@...heh.com, ocfs2-devel@....oracle.com,
        Yi Li <yili@...hong.com>
Subject: [PATCH] ocfs2: refactor the noqueue_attempted

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

Signed-off-by: Yi Li <yili@...hong.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ