Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3095036rwb; Mon, 15 Aug 2022 18:00:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR6REHFjqEaz/rYAG8OCDTwV+kSxF9SGgj7PHqiDcVXwO1nEguiwgtRbxBkVikZCv+A0XCKQ X-Received: by 2002:a05:6402:1e8f:b0:440:eb20:7a05 with SMTP id f15-20020a0564021e8f00b00440eb207a05mr16368879edf.169.1660611637452; Mon, 15 Aug 2022 18:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611637; cv=none; d=google.com; s=arc-20160816; b=TfybfTsYaunFRQPVQgtzHOzAdsLsrRxK8S1yBso20XsggfZmytKPIP+BaN49mB5NDQ ldgCwhsrl/SSN52UNTUhMXn/zvJKm8ehrt3/zgExYK07uyXuMkWCmmjK1OtZmndc/oem u+jjO26oWyDak2GluDAnQydx4MEbj9Vc9snBvVtWTU0/LcY+xyJJmE4iAwhg99RomYSb A1GAU2FwIBYagiwz3Sr5x4qUVaqWtGig/L68ilovxVvXbNiSMu9rOWAq6BOWoDTrqIPO tDs8JUH3MIbKn8+eani6sk73fh/hW/qmIFDjNM2Cw3L+ZaDhUBphQ3SNPp1BEEwHquT2 gyEQ== 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=3bylLZa+PuD2SzxLGRddXr2owL1dECXA4KQIWE0QI+c=; b=XF5t9jgfCCBmygX+yV9+l/BEUWhxHm0+rez0NO1yLYO8JxlDxe8dv2xOgbBZi0QYuy Atc4WTEiOCIYXReP1ANgzgCSSqdD5QDSdyL1LE4BDXywWrgW+nLKJ0EMrk9kexg7Z8MM V873wV6Iz1Jl4fezIU4BDELkANZ1jYiKO1W2i+d6tAhMvt+sIcUmiQCloYUBjaFq6rVw HOM5Mzwv8EILLvCshvWrUthhNZLApyF+T+26ca6WLyMdqzDKvbbOXgVv15UheaXi+X04 vJaZzKAMbpybKF+3CmNJ7xrZZHWZuLEyVmzi8KAAy/OsoZv6gXe8hq2QbwA6BS9o4EZS W9KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hLYZVuKE; 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 ho39-20020a1709070ea700b007307bd9033esi10930234ejc.972.2022.08.15.18.00.08; Mon, 15 Aug 2022 18:00:37 -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=hLYZVuKE; 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 S233469AbiHPAy4 (ORCPT + 99 others); Mon, 15 Aug 2022 20:54:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240795AbiHPAr1 (ORCPT ); Mon, 15 Aug 2022 20:47:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95B7B5E67; Mon, 15 Aug 2022 13:45:46 -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 dfw.source.kernel.org (Postfix) with ESMTPS id BD1E061265; Mon, 15 Aug 2022 20:45:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8646C433D6; Mon, 15 Aug 2022 20:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596345; bh=o3wlLHJ0FeVKurwv53Nfr7pBx/G+aKgzwMVRwDgmasU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hLYZVuKEszrUl6xNnFK5ddjZuyquhADE44TltucuZNMqsL2gDbhU3MQUKhpG8NdQ+ V0s8/JrENEuDMO6QKgLG+pHtrq5na6qsnVPnt+ErYpNFzDaahQKvOBX2sl53X3IOVu 45XbscptSuPUa6en69FQv3Jd9zErM1biOnIutRM4= 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.19 1007/1157] f2fs: fix to check inline_data during compressed inode conversion Date: Mon, 15 Aug 2022 20:06:03 +0200 Message-Id: <20220815180520.102413690@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 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