Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1405167pxj; Fri, 21 May 2021 13:27:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHDNsUpGlOGmx+wc5e6R5Dh3sJulel38A34Dnrd4kylydvaJMZPt1ODWGNekX4dWoOnT8r X-Received: by 2002:a5d:9744:: with SMTP id c4mr689899ioo.76.1621628854280; Fri, 21 May 2021 13:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628854; cv=none; d=google.com; s=arc-20160816; b=JgrBMJhuTnT4Nb02I2ymLWF7HqlSx9j6lpPFm99Wu0VNBRJt4O/535mC1aBnI6DPxG rWoW+gnkaPU3aHmkJHv7U4FTq3wFk7bU8IUniX//bd2/IFPnqgaZrAhyzYqwBkCJAHI2 mNE4K4ZLhiSi2ybL/VjeZ4XXePCIeXW8izRA6rnHbxbuj/vkyEpHSYTu6w1u2cKPLtnf Nw9R+3S4R9d/DV+bOrc4viIKfoXXT8GKGsN8Oodf3wt/1q1sJA4iuNxtQxLwUxjbYd2N 39TnfconKUsEr+ibaZsehhP/nLktOKb20issYRsGFVR0uZu/X/vZpQHB/gAFKxjfZKtz bIgw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+n895/c/46BH4yndA70M3g8EXU06Bxj196JGwXNPNPA=; b=IqHYN+4P0dwlXecJd1bOy0addps3EvgYcq5g9Po0kAIzn4QbAxhXZsTy4a66sw8ABs J3gAwy/9oUlGq1JoH1KIz9kjiP/4VB7COXyUsLUjHVaKcMeL2aG2x4D7ZvKN5aO5N86b i386W9fxdElJwmta7Q31C2WPbQzIruHH9krOatvGVJBpuDn7GPK8Dr8jWwTlKFzZ7lBW cbKb5erBN3hktBQQu8R3rSvhJvuKnDcaONW1IhfWvVBKduls9MgyNmwpb7viIhtUpXsN YvfpiR9gmU2odGokpA23hEdqvk5LvyhqIxKs5OW4SWz+RAYkx4HWlMjEpktYnHnyfZxd Urdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z6pBlx9P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si6509551iov.92.2021.05.21.13.27.21; Fri, 21 May 2021 13:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z6pBlx9P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233291AbhEUTDr (ORCPT + 99 others); Fri, 21 May 2021 15:03:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:53228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231354AbhEUTDq (ORCPT ); Fri, 21 May 2021 15:03:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D98D613AD; Fri, 21 May 2021 19:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621623743; bh=PwYVEBdAYioTg9dJDanRYBbNY1d6VzNe8pGxwNgHwts=; h=From:To:Cc:Subject:Date:From; b=Z6pBlx9PqRwpvhLSpS84t22o70Jagai7OtGqHdaPV+fIYO5XMz1N/8T7Y09nXFFpg 9Xe5GPyKesQTFirhUtEyFp9Npa+tHN0GMPSt7EenGDbQQHnqdziXFuFisgd6Y80mPd B4je9HWSH56F2nC/Y0A26eeB/lnq93i2W13D55snJP0FdJkX5L+32CcFJlNm2HvDn8 iDlr191ukjmJm70oPL+tERx5bJdf+WHDklvTUbY6ur8+zYQ5ISdjaLfeTQUOncryiN Zb+yuh9HETAuuTca0yIUZS8OoJvCMQ4r3awG/SqYztbThqjVNubiKub4axbdq4xH3C ZNNCtxofktY3Q== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 1/2] f2fs: immutable file can have null address in compressed chunk Date: Fri, 21 May 2021 12:02:16 -0700 Message-Id: <20210521190217.2484099-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If we released compressed blocks having an immutable bit, we can see less number of compressed block addresses. Let's fix wrong BUG_ON. Signed-off-by: Jaegeuk Kim --- fs/f2fs/compress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index d4f7371fb0d8..1189740aa141 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -927,7 +927,8 @@ static int __f2fs_cluster_blocks(struct inode *inode, } } - f2fs_bug_on(F2FS_I_SB(inode), !compr && ret != cluster_size); + f2fs_bug_on(F2FS_I_SB(inode), + !compr && ret != cluster_size && !IS_IMMUTABLE(inode)); } fail: f2fs_put_dnode(&dn); -- 2.31.1.818.g46aad6cb9e-goog