* [PATCH] f2fs: Remove unnecessary unlikely()
@ 2020-12-01 7:03 ` Shuosheng Huang
0 siblings, 0 replies; 2+ messages in thread
From: Shuosheng Huang @ 2020-12-01 7:03 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: linux-f2fs-devel, linux-kernel, tiny.windzz
From: Yangtao Li <tiny.windzz@gmail.com>
WARN_ON() already contains an unlikely(), so it's not necessary
to use unlikely.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
fs/f2fs/f2fs.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index cb700d797296..9f33a508fe51 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -33,10 +33,8 @@
#else
#define f2fs_bug_on(sbi, condition) \
do { \
- if (unlikely(condition)) { \
- WARN_ON(1); \
+ if (WARN_ON(condition)) \
set_sbi_flag(sbi, SBI_NEED_FSCK); \
- } \
} while (0)
#endif
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [f2fs-dev] [PATCH] f2fs: Remove unnecessary unlikely()
@ 2020-12-01 7:03 ` Shuosheng Huang
0 siblings, 0 replies; 2+ messages in thread
From: Shuosheng Huang @ 2020-12-01 7:03 UTC (permalink / raw)
To: jaegeuk, chao; +Cc: tiny.windzz, linux-kernel, linux-f2fs-devel
From: Yangtao Li <tiny.windzz@gmail.com>
WARN_ON() already contains an unlikely(), so it's not necessary
to use unlikely.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
fs/f2fs/f2fs.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index cb700d797296..9f33a508fe51 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -33,10 +33,8 @@
#else
#define f2fs_bug_on(sbi, condition) \
do { \
- if (unlikely(condition)) { \
- WARN_ON(1); \
+ if (WARN_ON(condition)) \
set_sbi_flag(sbi, SBI_NEED_FSCK); \
- } \
} while (0)
#endif
--
2.28.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-01 7:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 7:03 [PATCH] f2fs: Remove unnecessary unlikely() Shuosheng Huang
2020-12-01 7:03 ` [f2fs-dev] " Shuosheng Huang
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.