mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Yi Li <yili@winhong.com>, linux-kernel@vger.kernel.org
Cc: yilikernel@gmail.com, jlbec@evilplan.org, mark@fasheh.com,
	ocfs2-devel@oss.oracle.com
Subject: Re: [PATCH] ocfs2: refactor the noqueue_attempted
Date: Sun, 20 Mar 2022 21:40:07 +0800	[thread overview]
Message-ID: <ae21bbb1-9794-77e5-bd02-fad77096fa1d@linux.alibaba.com> (raw)
In-Reply-To: <20220319061028.3152-1-yili@winhong.com>

Don't see any optimization after this change.

On 3/19/22 2:10 PM, Yi Li wrote:
> 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",

      reply	other threads:[~2022-03-20 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-19  6:10 Yi Li
2022-03-20 13:40 ` Joseph Qi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae21bbb1-9794-77e5-bd02-fad77096fa1d@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=yili@winhong.com \
    --cc=yilikernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®