diff options
author | Wanpeng Li <wanpeng.li@linux.intel.com> | 2015-02-26 02:57:20 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-11 01:08:25 +0300 |
commit | 551414861fbd494d58d50f4750d1d1b7f42b6df1 (patch) | |
tree | 690c89299969d773ca7ab9e1c1c73e652b6760bd /fs/f2fs/f2fs.h | |
parent | 1abff93d01eddaab7ccdcf15f8cda4d91cbbcd9a (diff) | |
download | linux-551414861fbd494d58d50f4750d1d1b7f42b6df1.tar.xz |
f2fs: introduce macro __cp_payload
This patch introduce macro __cp_payload.
Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 51d97f7b77f0..7ced71b69f33 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -982,12 +982,17 @@ static inline unsigned long __bitmap_size(struct f2fs_sb_info *sbi, int flag) return 0; } +static inline block_t __cp_payload(struct f2fs_sb_info *sbi) +{ + return le32_to_cpu(F2FS_RAW_SUPER(sbi)->cp_payload); +} + static inline void *__bitmap_ptr(struct f2fs_sb_info *sbi, int flag) { struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); int offset; - if (le32_to_cpu(F2FS_RAW_SUPER(sbi)->cp_payload) > 0) { + if (__cp_payload(sbi) > 0) { if (flag == NAT_BITMAP) return &ckpt->sit_nat_version_bitmap; else |