Commit 0daaad97 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: avoid lock debugging overhead

If CONFIG_F2FS_CHECK_FS is unset, we don't need to add any debugging overhead.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 74de593a
...@@ -22,8 +22,10 @@ ...@@ -22,8 +22,10 @@
#ifdef CONFIG_F2FS_CHECK_FS #ifdef CONFIG_F2FS_CHECK_FS
#define f2fs_bug_on(condition) BUG_ON(condition) #define f2fs_bug_on(condition) BUG_ON(condition)
#define f2fs_down_write(x, y) down_write_nest_lock(x, y)
#else #else
#define f2fs_bug_on(condition) #define f2fs_bug_on(condition)
#define f2fs_down_write(x, y) down_write(x)
#endif #endif
/* /*
...@@ -556,7 +558,7 @@ static inline void f2fs_unlock_op(struct f2fs_sb_info *sbi) ...@@ -556,7 +558,7 @@ static inline void f2fs_unlock_op(struct f2fs_sb_info *sbi)
static inline void f2fs_lock_all(struct f2fs_sb_info *sbi) static inline void f2fs_lock_all(struct f2fs_sb_info *sbi)
{ {
down_write_nest_lock(&sbi->cp_rwsem, &sbi->cp_mutex); f2fs_down_write(&sbi->cp_rwsem, &sbi->cp_mutex);
} }
static inline void f2fs_unlock_all(struct f2fs_sb_info *sbi) static inline void f2fs_unlock_all(struct f2fs_sb_info *sbi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment