Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2777945rdb; Mon, 12 Feb 2024 17:03:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsrdUpQszj1zHSsOBBfBmQ4YbaYwe9RistDb0hMomxNokLvUosZEwf48m9+Nj7xHxPoE6o X-Received: by 2002:a05:6a20:c886:b0:19c:9df2:216 with SMTP id hb6-20020a056a20c88600b0019c9df20216mr7308147pzb.17.1707786230070; Mon, 12 Feb 2024 17:03:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707786230; cv=pass; d=google.com; s=arc-20160816; b=jYtrWe+9wY9enB2OiEaDC+7ifPUwSThksqO8Cv/q/66ldcY8ogSyJ3tEACGWTXePWM 9ZQvUTThOx6rJWooah47t8ZKKrkKnZMOQx8EqxX9nAGWlcmvGgyB9oV5E7wTo3xoax75 3X5wy3bQE7N3qh1Mp0XVjWPqaXVwy/ojClXX1cLMEc/MwDsJ06KWeq/t7inT7pPeDBPa RCzrkJ5fSrH6JI4K2wVXOiXEoaAk9HXtKJ0dcQjPpjBgY4e8ZkMS6E+NMYNhARNUtFHX /po2GQEkqB3ewNkj9OU+eRyCUlcEqSE0/UAqC7XCKpQgJHSSozIewJX6J7ZGyPYZ99YU tKwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=pD0h1TkS6jmwcoeFAcieiXRIi0YNxFcm8Gt23sl0QyQ=; fh=jNNbTnTEoYlAuP93CqtNU7rjR2O1IJjFR9/sMzIyGA4=; b=stNQTzJdsI68q450oLjIg/cga+SHyvedFVbrrOHWs/PfZSpwZxs8mzBQ2mJQV8RI34 z030Cw/rBQrCj/+kVUQ8Ef3vmLS8lj9z3lk0cIL/NZqgQ6eav+el+p37f+0FJRABoG4D KN2paFPnbPlTrQx+AHSdYqyHYkUejgcLPPThEE73/ap1tM6wIB39tMhJi3U68QEYM/s+ 4jX6K6yIBJZgZkYfBNWwMpEApKaFGKjrqrTTkRrJ5zWVoPh+eQ9PQXEhYPAliZ+rBkwC xOraTgU1fvHmz9l3bU2oJU0W+9gAYHUIlDsQiHsRNIVvYlFwx6HWIfpCOTYLiwDgsGn/ az8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BR+pxk77; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-62695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXBSTKF3fObJVbCr4d32guKkbJdKjUuSeAgyMfaMfdJJVIKb+yb/UM5+cgwQXo0K+s/BkqFwW1RLjZ9OyYBFNRt0pFc64RAJg2QtO8SKw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q6-20020aa79826000000b006e08a4ac43esi5681509pfl.376.2024.02.12.17.03.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 17:03:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BR+pxk77; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-62695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C734FB274A1 for ; Tue, 13 Feb 2024 00:52:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 790BF7A701; Tue, 13 Feb 2024 00:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BR+pxk77" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96AB579DAF; Tue, 13 Feb 2024 00:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707783769; cv=none; b=IB4FYVgLIFUZnhQbat1wTZzcxybAbZmLDI1INv+tBxZlyz4uqE1hHdBI5ZfFzuxUE9gleRTaSm+vSn6mSURoqh3CSTs+BuN9ngAzaoSS6JbJKYj+CmeQAr3mU8d/8/118zIpSlSLMPgY95igTX4/Br9O+bDEBSbKjkSTWi3mC/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707783769; c=relaxed/simple; bh=F5MHgzuXk0iDG0DDLth14bhgesw6odfg8Tl4xBXoi4w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u4FdvCMTCbv7bQ8RXoaoBWJE/qfgUBZI0rq1feeSMkF+QBGNnTi0pLyejbHrFofLukx8megtcmivZY1dx66GiTYNfLmqgsqjkrrm5YYF19IlB3zSU3p7ISwZFUuPX+SsZaVgFwITM6qFXAInoOX4HL39OH+zXiLN9YK7MhY9FxI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BR+pxk77; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3616C433C7; Tue, 13 Feb 2024 00:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707783769; bh=F5MHgzuXk0iDG0DDLth14bhgesw6odfg8Tl4xBXoi4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BR+pxk77agH0v7rGi9gas3uRIgt2KaC8ykg6RcjatV8PPbdAQGXqko2PuwsgWcXhr veckIBgfSZzMkAqzHRhpJ62PkKjOKaYV9G84F8KNzKfwDMZ3N1w9fpprfL3b0VNBwm 1D+gxT86xSbpppjhh+JQ0D0iWCrSwVeqc1MXs46am2Um+X/NexsTnUEXbwwalQ9jnA uoHk+edAimox+q/3lvfMTKbx5QFsE2ICURBU3cYkCuBYbulIwUrI80PFFU23U2P/+i KgVP1nJvR8MP/mTLJuYrnSbKy6eKe1gLO1A/4whJYPRur/anTydySBEB5nGQKFB6XH y6ZCkLaLCxHig== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Konstantin Komarov , Giovanni Santini , Sasha Levin , ntfs3@lists.linux.dev Subject: [PATCH AUTOSEL 6.1 11/28] fs/ntfs3: Update inode->i_size after success write into compressed file Date: Mon, 12 Feb 2024 19:22:09 -0500 Message-ID: <20240213002235.671934-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213002235.671934-1-sashal@kernel.org> References: <20240213002235.671934-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.77 Content-Transfer-Encoding: 8bit From: Konstantin Komarov [ Upstream commit d68968440b1a75dee05cfac7f368f1aa139e1911 ] Reported-by: Giovanni Santini Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin --- fs/ntfs3/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index f31c0389a2e7..14efe46df91e 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -1110,6 +1110,8 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from) iocb->ki_pos += written; if (iocb->ki_pos > ni->i_valid) ni->i_valid = iocb->ki_pos; + if (iocb->ki_pos > i_size) + i_size_write(inode, iocb->ki_pos); return written; } -- 2.43.0