diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-07-07 03:21:59 (GMT) |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-07-09 21:04:26 (GMT) |
commit | 6b2920a513ec9972f7b80d219fcf6f59130a1f31 (patch) | |
tree | e782c3532674eba15e819c192d14207e94e1e4cb /fs/f2fs/file.c | |
parent | 3aab8f828ef358ae92545294a14cd52d510cc585 (diff) | |
download | linux-6b2920a513ec9972f7b80d219fcf6f59130a1f31.tar.xz |
f2fs: use inner macro and function to clean up codes
In this patch we use below inner macro and function to clean up codes.
1. ADDRS_PER_PAGE
2. SM_I
3. f2fs_readonly
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 36fa505..7c652b3 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -272,8 +272,7 @@ static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence) } } - end_offset = IS_INODE(dn.node_page) ? - ADDRS_PER_INODE(F2FS_I(inode)) : ADDRS_PER_BLOCK; + end_offset = ADDRS_PER_PAGE(dn.node_page, F2FS_I(inode)); /* find data/hole in dnode block */ for (; dn.ofs_in_node < end_offset; |