lkml.org 
[lkml]   [2022]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.19 1007/1157] f2fs: fix to check inline_data during compressed inode conversion
    Date
    From: Chao Yu <chao@kernel.org>

    [ Upstream commit 7165841d578e0592848e09dc9d131aa30be44e1b ]

    When converting inode to compressed one via ioctl, it needs to check
    inline_data, since inline_data flag and compressed flag are incompatible.

    Fixes: 4c8ff7095bef ("f2fs: support data compression")
    Signed-off-by: Chao Yu <chao.yu@oppo.com>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/f2fs/f2fs.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
    index d9bbecd008d2..5c950298837f 100644
    --- a/fs/f2fs/f2fs.h
    +++ b/fs/f2fs/f2fs.h
    @@ -4401,7 +4401,7 @@ static inline bool f2fs_lfs_mode(struct f2fs_sb_info *sbi)
    static inline bool f2fs_may_compress(struct inode *inode)
    {
    if (IS_SWAPFILE(inode) || f2fs_is_pinned_file(inode) ||
    - f2fs_is_atomic_file(inode))
    + f2fs_is_atomic_file(inode) || f2fs_has_inline_data(inode))
    return false;
    return S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode);
    }
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-09-17 16:27    [W:7.573 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site