Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027474rwb; Mon, 15 Aug 2022 16:25:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7gZPf69rFlborYAoYBKWPZEFM7uZMk3OSr7fo8TKmdUlFaOJ7tQsJABB3k5cxTi1sBCN2H X-Received: by 2002:aa7:d813:0:b0:43c:dedd:b4e8 with SMTP id v19-20020aa7d813000000b0043cdeddb4e8mr16344169edq.231.1660605950459; Mon, 15 Aug 2022 16:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605950; cv=none; d=google.com; s=arc-20160816; b=nJjwgbCClblxlG+yO109pwEZ92+eGJMRUcTjX2yVv4gEx1SiKQuAne4Ir4/dXtqI1o jSwDJVesLfQqVtbUiHUW1AMd6MO/Go8JOh7H2feRZBrNFdBIufuBvJIZBkZxgEKW8kqk A/jyOe0NaO13sn7goQAS2C8ujnLAaGzZ3TOuuHo2Ut6P7Fz5AwkoUbH6g8TtWVQggtvR dTn1Fy/V5qq6y/PF7kJCeEnqk/jeGjCXCjlEtV2961zfFgvw6ejZ4l3u3DC6ckwuK5wf 4KRiNy05CUeCtGPNH8EhMPO8J/lHsB7cweZs7qzdA2ccPti0/tWJG5aFrHeF6z3EPR5u eE+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YLfJ+yx8qMNJhE4jkpOLxqAD7ARSMic+HZs8R9MqKGs=; b=dvFedcMIpycjaxlawiYZ9zexrZL334rU48231Jvvsq6jGmj7KXLp0GnM+SiQ1BMylU 4KatFXoyO1TAeBQk2N2viZCRIw4Udgw0BZxG5dw+2FfGUB2cyqaGJSYy15JCEz4Ja2kI 9r4aB9Y2bgrUbbUqVjiCqZumEb1FSfGHZc5jMEhagQDAMsiXX/WOBvNEA2/IvitN67O3 brDcBdfwFpCoiG/OUHIxKfkVKOqHV5/UsfBG02sNqA+1NBj/8IGx0TzbTmPTkbuDV3EY 757gBcjFPacxYfQzQmdOOpfW/Wh4fmL230fyRfMnrmLHABASlSFo2rs3fP7VFIDACovr JwFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sC3YceNF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lz4-20020a170906fb0400b00718cd33f793si7552266ejb.158.2022.08.15.16.25.24; Mon, 15 Aug 2022 16:25:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sC3YceNF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242872AbiHOW6g (ORCPT + 99 others); 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } -- 2.35.1