* [PATCH] fs: btrfs: Remove redundant condition
@ 2022-03-23 1:45 Haowen Bai
2022-03-23 7:54 ` Johannes Thumshirn
0 siblings, 1 reply; 3+ messages in thread
From: Haowen Bai @ 2022-03-23 1:45 UTC (permalink / raw)
To: clm, josef, dsterba; +Cc: linux-btrfs, linux-kernel, Haowen Bai
The logic !A || A && B is equivalent to !A || B. so we can
make code clear.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
fs/btrfs/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5bbea5e..50c2a37 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2012,8 +2012,7 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page
* to use run_delalloc_nocow() here, like for regular
* preallocated inodes.
*/
- ASSERT(!zoned ||
- (zoned && btrfs_is_data_reloc_root(inode->root)));
+ ASSERT(!zoned || btrfs_is_data_reloc_root(inode->root));
ret = run_delalloc_nocow(inode, locked_page, start, end,
page_started, nr_written);
} else if (!inode_can_compress(inode) ||
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: btrfs: Remove redundant condition
2022-03-23 1:45 [PATCH] fs: btrfs: Remove redundant condition Haowen Bai
@ 2022-03-23 7:54 ` Johannes Thumshirn
2022-03-24 17:22 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2022-03-23 7:54 UTC (permalink / raw)
To: Haowen Bai, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
On 23/03/2022 02:47, Haowen Bai wrote:
> The logic !A || A && B is equivalent to !A || B. so we can
> make code clear.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
Well I guess as this is the 3rd time someone wants to do this:
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: btrfs: Remove redundant condition
2022-03-23 7:54 ` Johannes Thumshirn
@ 2022-03-24 17:22 ` David Sterba
0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2022-03-24 17:22 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Haowen Bai, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
On Wed, Mar 23, 2022 at 07:54:39AM +0000, Johannes Thumshirn wrote:
> On 23/03/2022 02:47, Haowen Bai wrote:
> > The logic !A || A && B is equivalent to !A || B. so we can
> > make code clear.
> >
> > Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> > ---
>
> Well I guess as this is the 3rd time someone wants to do this:
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Ok then, added to misc-next.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-24 17:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23 1:45 [PATCH] fs: btrfs: Remove redundant condition Haowen Bai
2022-03-23 7:54 ` Johannes Thumshirn
2022-03-24 17:22 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox