]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netfs: Fix is-caching check in read-retry
authorDavid Howells <dhowells@redhat.com>
Mon, 16 Dec 2024 20:34:45 +0000 (20:34 +0000)
committerChristian Brauner <brauner@kernel.org>
Fri, 20 Dec 2024 21:07:58 +0000 (22:07 +0100)
commitd4e338de17cb6532bf805fae00db8b41e914009b
treecd764e0e14cf605fdad2677f45a50408e57dac81
parentd0327c824338cdccad058723a31d038ecd553409
netfs: Fix is-caching check in read-retry

netfs: Fix is-caching check in read-retry

The read-retry code checks the NETFS_RREQ_COPY_TO_CACHE flag to determine
if there might be failed reads from the cache that need turning into reads
from the server, with the intention of skipping the complicated part if it
can.  The code that set the flag, however, got lost during the read-side
rewrite.

Fix the check to see if the cache_resources are valid instead.  The flag
can then be removed.

Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading")
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/3752048.1734381285@warthog.procyon.org.uk
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/netfs/read_retry.c
include/linux/netfs.h