Patch "netfs: Fix read-retry for fs with no ->prepare_read()" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    netfs: Fix read-retry for fs with no ->prepare_read()

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     netfs-fix-read-retry-for-fs-with-no-prepare_read.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 201c823e4bd0764de5a83d2b6edde2f52de2f855
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Tue Jan 7 14:43:30 2025 +0000

    netfs: Fix read-retry for fs with no ->prepare_read()
    
    [ Upstream commit 904abff4b1b94184aaa0e9f5fce7821f7b5b81a3 ]
    
    Fix netfslib's read-retry to only call ->prepare_read() in the backing
    filesystem such a function is provided.  We can get to this point if a
    there's an active cache as failed reads from the cache need negotiating
    with the server instead.
    
    Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading")
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/529329.1736261010@xxxxxxxxxxxxxxxxxxxxxx
    cc: Jeff Layton <jlayton@xxxxxxxxxx>
    cc: netfs@xxxxxxxxxxxxxxx
    cc: linux-fsdevel@xxxxxxxxxxxxxxx
    Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/netfs/read_retry.c b/fs/netfs/read_retry.c
index 2701f7d45999..48fb0303f7ee 100644
--- a/fs/netfs/read_retry.c
+++ b/fs/netfs/read_retry.c
@@ -149,7 +149,8 @@ static void netfs_retry_read_subrequests(struct netfs_io_request *rreq)
 			BUG_ON(!len);
 
 			/* Renegotiate max_len (rsize) */
-			if (rreq->netfs_ops->prepare_read(subreq) < 0) {
+			if (rreq->netfs_ops->prepare_read &&
+			    rreq->netfs_ops->prepare_read(subreq) < 0) {
 				trace_netfs_sreq(subreq, netfs_sreq_trace_reprep_failed);
 				__set_bit(NETFS_SREQ_FAILED, &subreq->flags);
 			}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux