mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: YueHaibing <yuehaibing@huawei.com>
Cc: jack@suse.cz, reiserfs-devel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] reiserfs: Remove unneed check in reiserfs_write_full_page()
Date: Mon, 24 May 2021 11:01:23 +0200	[thread overview]
Message-ID: <20210524090123.GE32705@quack2.suse.cz> (raw)
In-Reply-To: <20210523090258.27696-1-yuehaibing@huawei.com>

On Sun 23-05-21 17:02:58, YueHaibing wrote:
> Condition !A || A && B is equivalent to !A || B.
> 
> Generated by: scripts/coccinelle/misc/excluded_middle.cocci
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Fair enough. Thanks for the patch. Added to my tree.

								Honza

> ---
>  fs/reiserfs/inode.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
> index 780bb90c1804..f49b72ccac4c 100644
> --- a/fs/reiserfs/inode.c
> +++ b/fs/reiserfs/inode.c
> @@ -2584,9 +2584,7 @@ static int reiserfs_write_full_page(struct page *page,
>  			clear_buffer_dirty(bh);
>  			set_buffer_uptodate(bh);
>  		} else if ((checked || buffer_dirty(bh)) &&
> -		           (!buffer_mapped(bh) || (buffer_mapped(bh)
> -						       && bh->b_blocknr ==
> -						       0))) {
> +			   (!buffer_mapped(bh) || bh->b_blocknr == 0)) {
>  			/*
>  			 * not mapped yet, or it points to a direct item, search
>  			 * the btree for the mapping info, and log any direct
> -- 
> 2.20.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2021-05-24  9:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23  9:02 YueHaibing
2021-05-24  9:01 ` Jan Kara [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=20210524090123.GE32705@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=yuehaibing@huawei.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®