• Chao Yu's avatar
    f2fs: do more sanity check on inode · f240d3aa
    Chao Yu authored
    There are several issues in sanity_check_inode():
    - The code looks not clean, it checks extra_attr related condition
    dispersively.
    - It missed to check i_extra_isize w/ lower boundary
    - It missed to check feature dependency: prjquota, inode_chksum,
    inode_crtime, compression features rely on extra_attr feature.
    - It's not necessary to check i_extra_isize due to it will only
    be assigned to non-zero value if f2fs_has_extra_attr() is true
    in do_read_inode().
    
    Fix them all in this patch.
    Signed-off-by: default avatarChao Yu <chao@kernel.org>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    f240d3aa
f2fs.h 149 KB