diff mbox series

btrfs: Remove duplicate 'unlikely()' usage

Message ID 20240829072952.35335-1-kunwu.chan@linux.dev (mailing list archive)
State New, archived
Headers show
Series btrfs: Remove duplicate 'unlikely()' usage | expand

Commit Message

Kunwu Chan Aug. 29, 2024, 7:29 a.m. UTC
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(-)

Comments

David Sterba Aug. 29, 2024, 4:21 p.m. UTC | #1
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"
diff mbox series

Patch

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;