From nobody Fri Oct 24 20:31:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF659C25B08 for ; Mon, 15 Aug 2022 22:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244887AbiHOW6g (ORCPT ); Mon, 15 Aug 2022 18:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352688AbiHOW4g (ORCPT ); Mon, 15 Aug 2022 18:56:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ACF145F57; Mon, 15 Aug 2022 12:55:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 11F2DB8113E; Mon, 15 Aug 2022 19:55:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 657F6C433D6; Mon, 15 Aug 2022 19:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593350; bh=orIIS7BYb3VLHuYePj/5e3TmpzqFAIGk++ZHHXrEeps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sC3YceNFatU5B/6zfKu1IYR8UWZQ7WNuUaTrhk9pbJTjFiKx+cPFqFGOZeyJlOhTA fYPXHJRyvnANogN7MniJKi7qd8ZpP0FNCAvWny3uNQqcwOYz2qmfT0pG5yuHw3IVrH nvQ2KPkk+MFVH5hA7lYmY7s/UltycpuySRJcjDMU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.18 0933/1095] f2fs: fix to check inline_data during compressed inode conversion Date: Mon, 15 Aug 2022 20:05:32 +0200 Message-Id: <20220815180507.819193313@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chao Yu [ 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 Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- 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 ce8f496a7e5d..3f8a3d63a971 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -4382,7 +4382,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); } --=20 2.35.1