* [PATCH] btrfs: Remove duplicate 'unlikely()' usage
@ 2024-08-29 7:29 Kunwu Chan
2024-08-29 16:21 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Kunwu Chan @ 2024-08-29 7:29 UTC (permalink / raw)
To: clm, josef, dsterba; +Cc: linux-btrfs, linux-kernel, Kunwu Chan
From: Kunwu Chan <chentao@kylinos.cn>
nested unlikely() calls, IS_ERR already uses unlikely() internally
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
fs/btrfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 4b58306e1ef1..cc07ba7313b7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -898,7 +898,7 @@ static int extent_range_clear_dirty_for_io(struct inode *inode, u64 start, u64 e
for (unsigned long index = start >> PAGE_SHIFT;
index <= end_index; index++) {
folio = __filemap_get_folio(inode->i_mapping, index, 0, 0);
- if (unlikely(IS_ERR(folio))) {
+ if (IS_ERR(folio)) {
if (!ret)
ret = PTR_ERR(folio);
continue;
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: Remove duplicate 'unlikely()' usage
2024-08-29 7:29 [PATCH] btrfs: Remove duplicate 'unlikely()' usage Kunwu Chan
@ 2024-08-29 16:21 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2024-08-29 16:21 UTC (permalink / raw)
To: Kunwu Chan; +Cc: clm, josef, dsterba, linux-btrfs, linux-kernel, Kunwu Chan
On Thu, Aug 29, 2024 at 03:29:52PM +0800, Kunwu Chan wrote:
> From: Kunwu Chan <chentao@kylinos.cn>
>
> nested unlikely() calls, IS_ERR already uses unlikely() internally
>
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Thanks for noticing it, I've folded the change to the patch "btrfs:
convert extent_range_clear_dirty_for_io() to use a folio"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-29 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 7:29 [PATCH] btrfs: Remove duplicate 'unlikely()' usage Kunwu Chan
2024-08-29 16:21 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.