From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796221068; b=fTJnoPXAfz4Jt883rCYMC5v6SBIbmHeMJlsGaUh3Qx3dZh/gg/wvnDbnJ4q1b+PQAkFB QkQ/irdwjgP91/6yL2D/PYgEhKvoUlrWgMxuinqXFkasdjYpAWVOUtP90A9ybtKbzYq3l Cd/l+PkYR+R3Wp0nfLiamRUHW8k+nyQdceiq9bER5Yz5yZ6uVG2T94fTI19PCCGDxMCtG vit6QxhQfrkrCquRKZb9RzNmquAV0OfOIzfMYfIjp94Ky7zHjYPnLyWbkmxr6VIePHKp2 S5jnWK8DY1VNNSBnhet162DewNmT7wj/YnRhJNwVVWARG/Awul0gAEQK0orZLueMzNQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796221068; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=5Y4La78deuotXGXDXE9yNfCCx7k6snT5dOSaD9GVwtQ=; b=sbYPcdjwrXRBLrzZ+FPFTth6CvoSXCf4/Z4cEitEw3rr3RUaNDE+/WerCQKCa9EfW3cG sKMyRnPH2A+fmbkMRNr7hOsDt97ivtB14+IluPSxNx0/pbgxMTJ+JvXXC00pP/Old2ZSa zufeVq1dXKNZ+nOWQY4miMtBklbzg5gZwgMn4V/sfPMpbkNR2m/BkYeOar2KYmQPpzJMQ ItsaKASKZ/YcmJRltE/hmpuUXVSjrOCaKID+e2nCzVvU4VY9b7jwjmYz6Kn+Gf8da/bFB eCaMgCSEwl647UXzFMGU2cC8mpjtjKb+mC3MtGn24vAm80nYOv6flPq4ynxKkAdta9A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="YR/TZiJv"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23D28606A32A for ; Wed, 2 Dec 2026 14:17:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=YR/TZiJv Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34C241F00930; Wed, 2 Dec 2026 14:17:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796221068; bh=5Y4La78deuotXGXDXE9yNfCCx7k6snT5dOSaD9GVwtQ=; h=Subject:To:Cc:From:Date; b=YR/TZiJvdvTqIbg13CZQ94/de0HBaDtrUAOfTNeUQTQpEEXmjuHc40Mjqdn6PNmjo VhaawkG6Olf9J5EtfwHCJAHQe4jVgZZa7PBK6IyE2tQmJKnQp8DJ/RGb3KLHlWrZOi wXOLoVO73qJuUSq12d+I1blLC8e+F2dJThhfBfZs= Subject: FAILED: patch "[PATCH] fuse: clear the old EOF tail before writeback-cache writes" failed to apply to 6.12-stable tree To: dennylin0707@gmail.com,mszeredi@redhat.com Cc: From: Date: Wed, 02 Dec 2026 14:03:06 +0100 Message-ID: <2026120206-strongman-manhole-3d0e@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x d9013d15b9379b323f1bcdfff7e7d96df537268a # git commit -s git send-email --to '' --in-reply-to '2026120206-strongman-manhole-3d0e@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From d9013d15b9379b323f1bcdfff7e7d96df537268a Mon Sep 17 00:00:00 2001 From: Hungyu Lin Date: Tue, 3 Nov 2026 08:34:25 +0000 Subject: [PATCH] fuse: clear the old EOF tail before writeback-cache writes Buffered writeback-cache writes go through iomap_file_buffered_write(), but do not clear cached data between the old EOF and the write position. If a shared mapping dirtied the tail of the old EOF page, an extending write can expose those bytes as file contents instead of zeros. A later writeback can also send them to the server. Clear the gap under the existing inode lock before the buffered write. Use the same page-cache cleanup as fuse_perform_write() does for write-through writes, leaving the write range itself untouched. Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on") Cc: stable@vger.kernel.org Signed-off-by: Hungyu Lin Signed-off-by: Miklos Szeredi diff --git a/fs/fuse/file.c b/fs/fuse/file.c index dcf333aaec17..9e64fe040277 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1580,6 +1580,11 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from) written = direct_write_fallback(iocb, from, written, fuse_perform_write(iocb, from)); } else if (writeback) { + loff_t old_size = i_size_read(inode); + + if (iocb->ki_pos > old_size) + truncate_pagecache_range(inode, old_size, iocb->ki_pos - 1); + /* * Use iomap so that we can do granular uptodate reads * and granular dirty tracking for large folios.