summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim2014-02-04 05:01:10 +0100
committerJaegeuk Kim2014-02-17 06:58:52 +0100
commit491c0854b41380f48e422c00ae7e25ae4d02cecc (patch)
treec38f223a14407ecda736da3b9683f7251b4d08bc /fs/f2fs/recovery.c
parentf2fs: fix the potential mismatch between dir's i_size and i_blocks (diff)
downloadkernel-qcow2-linux-491c0854b41380f48e422c00ae7e25ae4d02cecc.tar.gz
kernel-qcow2-linux-491c0854b41380f48e422c00ae7e25ae4d02cecc.tar.xz
kernel-qcow2-linux-491c0854b41380f48e422c00ae7e25ae4d02cecc.zip
f2fs: clean up with a macro
This patch adds GET_BLKOFF_FROM_SEG0 to clean up some codes. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index f1b0b8917436..bda04a012909 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -218,8 +218,7 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
{
struct seg_entry *sentry;
unsigned int segno = GET_SEGNO(sbi, blkaddr);
- unsigned short blkoff = GET_SEGOFF_FROM_SEG0(sbi, blkaddr) &
- (sbi->blocks_per_seg - 1);
+ unsigned short blkoff = GET_BLKOFF_FROM_SEG0(sbi, blkaddr);
struct f2fs_summary sum;
nid_t ino, nid;
void *kaddr;