Skip to contentSkip to conversation

nilfs2: Remove duplicate 'unlikely()' usage

PATCH In review Kunwu Chan 2 participants 2 messages Aug 29, 2024 NILFS2 filesystem

lore
Share & tools
lore

Kunwu Chan

author
#0 lore raw

PATCH 1/1 nilfs2: Remove duplicate 'unlikely()' usage

From: Kunwu Chan <[email protected]>

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

---
 fs/nilfs2/page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/page.c +1 -1
index 7797903e014e..9c0b7cddeaae 100644
@@ -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);
Signature · 1 line
2.41.0
maintainer
#1 lore raw
Quoted 24 lines · Kunwu Chan

From: Kunwu Chan <[email protected]>

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

---
 fs/nilfs2/page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/page.c +1 -2
index 7797903e014e..9c0b7cddeaae 100644
@@ -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);
--
Quoted 2 lines

2.41.0

Thank you. I'll pick it up.

Ryusuke Konishi