• C
    f2fs: remove unneeded pointer conversion · 81ca7350
    Chao Yu 提交于
    There are redundant pointer conversion in following call stack:
     - at position a, inode was been converted to f2fs_file_info.
     - at position b, f2fs_file_info was been converted to inode again.
    
     - truncate_blocks(inode,..)
      - fi = F2FS_I(inode)		---a
      - ADDRS_PER_PAGE(node_page, fi)
       - addrs_per_inode(fi)
        - inode = &fi->vfs_inode	---b
        - f2fs_has_inline_xattr(inode)
         - fi = F2FS_I(inode)
         - is_inode_flag_set(fi,..)
    
    In order to avoid unneeded conversion, alter ADDRS_PER_PAGE and
    addrs_per_inode to acept parameter with type of inode pointer.
    Signed-off-by: NChao Yu <chao2.yu@samsung.com>
    Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
    81ca7350
recovery.c 14.9 KB