[PATCH] nilfs2: Remove duplicate 'unlikely()' usage

Kunwu Chan posted 1 patch 1 year, 3 months ago
There is a newer version of this series
fs/nilfs2/page.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] nilfs2: Remove duplicate 'unlikely()' usage
Posted by Kunwu Chan 1 year, 3 months ago
From: Kunwu Chan <chentao@kylinos.cn>

nested unlikely() calls, IS_ERR already uses unlikely() internally

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
 fs/nilfs2/page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
index 7797903e014e..9c0b7cddeaae 100644
--- a/fs/nilfs2/page.c
+++ b/fs/nilfs2/page.c
@@ -262,7 +262,7 @@ int nilfs_copy_dirty_pages(struct address_space *dmap,
 			NILFS_FOLIO_BUG(folio, "inconsistent dirty state");
 
 		dfolio = filemap_grab_folio(dmap, folio->index);
-		if (unlikely(IS_ERR(dfolio))) {
+		if (IS_ERR(dfolio)) {
 			/* No empty page is added to the page cache */
 			folio_unlock(folio);
 			err = PTR_ERR(dfolio);
-- 
2.41.0
Re: [PATCH] nilfs2: Remove duplicate 'unlikely()' usage
Posted by Ryusuke Konishi 1 year, 3 months ago
On Thu, Aug 29, 2024 at 4:16 PM 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>
> ---
>  fs/nilfs2/page.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
> index 7797903e014e..9c0b7cddeaae 100644
> --- a/fs/nilfs2/page.c
> +++ b/fs/nilfs2/page.c
> @@ -262,7 +262,7 @@ int nilfs_copy_dirty_pages(struct address_space *dmap,
>                         NILFS_FOLIO_BUG(folio, "inconsistent dirty state");
>
>                 dfolio = filemap_grab_folio(dmap, folio->index);
> -               if (unlikely(IS_ERR(dfolio))) {
> +               if (IS_ERR(dfolio)) {
>                         /* No empty page is added to the page cache */
>                         folio_unlock(folio);
>                         err = PTR_ERR(dfolio);
> --
> 2.41.0
>

Thank you.  I'll pick it up.

Ryusuke Konishi