From mboxrd@z Thu Jan 1 00:00:00 1970 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 B2F9A2D051 for ; Fri, 5 Jan 2024 14:34:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="x8baXqh5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA163C433C8; Fri, 5 Jan 2024 14:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704465275; bh=zGhz4HK3OqtoT/s7fHpDT0nLKMtykEIhvfAADd+RUpc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=x8baXqh5mpSOXAlekxjBBlbAJ0N/7Vm+hMJPgEoLHVeYPKpTWflYJVwgUSMlAhn4X pW8tbuJ+0Ijd7HjSRp94oZybG+DsL6GOuU+Mz8iy/Ps7DmpI4B34yIKd73teYKpf/u myLBKBkGE0mTZFF3Jw1XE3bNnEIvBVexroWt0nbY= Date: Fri, 5 Jan 2024 15:34:32 +0100 From: Greg KH To: Sarthak Kukreti Cc: stable@vger.kernel.org, "Darrick J. Wong" , Christoph Hellwig , Mike Snitzer , Jens Axboe Subject: Re: [PATCH 4.14.y] block: Don't invalidate pagecache for invalid falloc modes Message-ID: <2024010520-arming-resonate-825b@gregkh> References: <2023101517-patriarch-reuse-cc1c@gregkh> <20240104222745.1783780-1-sarthakkukreti@chromium.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240104222745.1783780-1-sarthakkukreti@chromium.org> On Thu, Jan 04, 2024 at 02:27:45PM -0800, Sarthak Kukreti wrote: > Only call truncate_bdev_range() if the fallocate mode is supported. This > fixes a bug where data in the pagecache could be invalidated if the > fallocate() was called on the block device with an invalid mode. > > Fixes: 25f4c41415e5 ("block: implement (some of) fallocate for block devices") > Cc: stable@vger.kernel.org > Reported-by: "Darrick J. Wong" > Signed-off-by: Sarthak Kukreti > Reviewed-by: Christoph Hellwig > Reviewed-by: "Darrick J. Wong" > Signed-off-by: Mike Snitzer > Link: https://lore.kernel.org/r/20231011201230.750105-1-sarthakkukreti@chromium.org > Signed-off-by: Jens Axboe > (cherry picked from commit 1364a3c391aedfeb32aa025303ead3d7c91cdf9d) > Signed-off-by: Sarthak Kukreti > --- > fs/block_dev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) All now queued up, thanks for the backports. greg k-h