diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-05-23 16:25:08 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 20:31:50 +0200 |
commit | 7b525dd01365c6764018e374d391c92466be1b7a (patch) | |
tree | 58b163421b659b8f6e73649e4a82c94200b5fc41 /fs/f2fs/segment.h | |
parent | f2fs: fix to initialize min_mtime with ULLONG_MAX (diff) | |
download | linux-7b525dd01365c6764018e374d391c92466be1b7a.tar.xz linux-7b525dd01365c6764018e374d391c92466be1b7a.zip |
f2fs: clean up with is_valid_blkaddr()
- rename is_valid_blkaddr() to is_valid_meta_blkaddr() for readability.
- introduce is_valid_blkaddr() for cleanup.
No logic change in this patch.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | fs/f2fs/segment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 5b7c35fa4bd2..86bbc189f1e0 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -85,7 +85,7 @@ (GET_SEGOFF_FROM_SEG0(sbi, blk_addr) & ((sbi)->blocks_per_seg - 1)) #define GET_SEGNO(sbi, blk_addr) \ - ((((blk_addr) == NULL_ADDR) || ((blk_addr) == NEW_ADDR)) ? \ + ((!is_valid_blkaddr(blk_addr)) ? \ NULL_SEGNO : GET_L2R_SEGNO(FREE_I(sbi), \ GET_SEGNO_FROM_SEG0(sbi, blk_addr))) #define BLKS_PER_SEC(sbi) \ |