From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, David Howells <dhowells@redhat.com>,
Paulo Alcantara <pc@manguebit.org>,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
"Christian Brauner (Amutable)" <brauner@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.18 1016/1611] netfs: Fix netfs_create_write_req() to handle async cache object creation
Date: Tue, 21 Jul 2026 17:18:52 +0200 [thread overview]
Message-ID: <20260721152538.246519783@linuxfoundation.org> (raw)
In-Reply-To: <20260721152514.750365251@linuxfoundation.org>
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells@redhat.com>
[ Upstream commit dbd6f56d975b23241b7bbb11bb8f562af548a0aa ]
netfs_create_write_req() will skip caching if the fscache cookie is
disabled, but this is a problem because async cache object creation might
not have got far enough yet that has been enabled - thereby causing the
call to fscache_begin_write_operation() to be skipped.
Fix this by removing the checks on the cookie and delegating this to
fscache_begin_write_operation().
Fixes: 7b589a9b45ae ("netfs: Fix handling of USE_PGPRIV2 and WRITE_TO_CACHE flags")
Closes: https://sashiko.dev/#/patchset/20260624115737.2964520-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260625140640.3116900-3-dhowells@redhat.com
cc: Paulo Alcantara <pc@manguebit.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/netfs/write_issue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c
index 03d170b9022b7d..26289849343037 100644
--- a/fs/netfs/write_issue.c
+++ b/fs/netfs/write_issue.c
@@ -106,7 +106,7 @@ struct netfs_io_request *netfs_create_write_req(struct address_space *mapping,
_enter("R=%x", wreq->debug_id);
ictx = netfs_inode(wreq->inode);
- if (is_cacheable && netfs_is_cache_enabled(ictx))
+ if (is_cacheable)
fscache_begin_write_operation(&wreq->cache_resources, netfs_i_cookie(ictx));
if (rolling_buffer_init(&wreq->buffer, wreq->debug_id, ITER_SOURCE) < 0)
goto nomem;
--
2.53.0
next parent reply other threads:[~2026-07-21 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260721152514.750365251@linuxfoundation.org>
2026-07-21 15:18 ` Greg Kroah-Hartman [this message]
2026-07-21 15:18 ` [PATCH 6.18 1017/1611] netfs: Fix writethrough to use collection offload Greg Kroah-Hartman
2026-07-21 15:18 ` [PATCH 6.18 1018/1611] netfs: Fix writeback error handling Greg Kroah-Hartman
2026-07-21 15:18 ` [PATCH 6.18 1019/1611] netfs: Fix folio state after ENOMEM whilst under writeback iteration Greg Kroah-Hartman
2026-07-21 15:19 ` [PATCH 6.18 1026/1611] cifs: Fix missing credit release on failure in cifs_issue_read() Greg Kroah-Hartman
2026-07-21 15:27 ` [PATCH 6.18 1547/1611] cifs: SMB1 split: Rename cifstransport.c Greg Kroah-Hartman
2026-07-21 15:27 ` [PATCH 6.18 1548/1611] cifs: SMB1 split: Add some #includes Greg Kroah-Hartman
2026-07-21 15:27 ` [PATCH 6.18 1562/1611] hfs/hfsplus: prevent getting negative values of offset/length Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260721152538.246519783@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=brauner@kernel.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netfs@lists.linux.dev \
--cc=patches@lists.linux.dev \
--cc=pc@manguebit.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox