Skip to contentSkip to conversation

btrfs: Remove duplicate 'unlikely()' usage

PATCH In review Kunwu Chan 2 participants 2 messages Aug 29, 2024 Btrfs file system

lore
Share & tools
lore

Kunwu Chan

author
#0 lore raw

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

From: Kunwu Chan <[email protected]>

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

---
 fs/btrfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
index 4b58306e1ef1..cc07ba7313b7 100644
@@ -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;
Signature · 1 line
2.41.0
#1 lore raw
Quoted 5 lines · Kunwu Chan

From: Kunwu Chan <[email protected]>

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

Thanks for noticing it, I've folded the change to the patch "btrfs:
convert extent_range_clear_dirty_for_io() to use a folio"