mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Thorsten Blum <thorsten.blum@toblux.com>,
	mark@fasheh.com, jlbec@evilplan.org,
	akpm <akpm@linux-foundation.org>
Cc: ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ocfs2: Use max() to improve ocfs2_dlm_seq_show()
Date: Tue, 20 Aug 2024 20:17:33 +0800	[thread overview]
Message-ID: <e8b5af8b-6265-4f48-9c8f-d5a8d1302e5d@linux.alibaba.com> (raw)
In-Reply-To: <20240820021605.97887-3-thorsten.blum@toblux.com>



On 8/20/24 10:16 AM, Thorsten Blum wrote:
> Use the max() macro to simplify the ocfs2_dlm_seq_show() function and
> improve its readability.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>

Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
>  fs/ocfs2/dlmglue.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index da78a04d6f0b..60df52e4c1f8 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -3151,11 +3151,8 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)
>  #ifdef CONFIG_OCFS2_FS_STATS
>  	if (!lockres->l_lock_wait && dlm_debug->d_filter_secs) {
>  		now = ktime_to_us(ktime_get_real());
> -		if (lockres->l_lock_prmode.ls_last >
> -		    lockres->l_lock_exmode.ls_last)
> -			last = lockres->l_lock_prmode.ls_last;
> -		else
> -			last = lockres->l_lock_exmode.ls_last;
> +		last = max(lockres->l_lock_prmode.ls_last,
> +			   lockres->l_lock_exmode.ls_last);
>  		/*
>  		 * Use d_filter_secs field to filter lock resources dump,
>  		 * the default d_filter_secs(0) value filters nothing,

      reply	other threads:[~2024-08-20 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  2:16 Thorsten Blum
2024-08-20 12:17 ` 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=e8b5af8b-6265-4f48-9c8f-d5a8d1302e5d@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@lists.linux.dev \
    --cc=thorsten.blum@toblux.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®