Patch "netfs, afs: Fix symlink reading" has been added to the 6.18-stable tree
[email protected]
AppliedThis is a note to let you know that I've just added the patch titled
netfs, afs: Fix symlink reading
to the 6.18-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-afs-fix-symlink-reading.patch
and it can be found in the queue-6.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From c51e89c5b5db3e1927738fad7cd18b66dde68aed Mon Sep 17 00:00:00 2001
From: David Howells <[email protected]>
Date: Tue, 15 Sep 2026 17:21:59 +0100
Subject: netfs, afs: Fix symlink reading
From: David Howells <[email protected]>
commit c51e89c5b5db3e1927738fad7cd18b66dde68aed upstream.
Fix the reading of symlinks from the cache in afs by making netfslib trim the amount read down to i_size. The problem is that afs sets the size of the iterator to the size of the buffer (PAGE_SIZE) so that the cache can round the read size up to the cache's DIO size.
Note that this also impacts the reading of AFS mountpoints as they're just stored as symlinks with an odd file mode.
--- fs/netfs/read_collect.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/netfs/read_collect.c +5 -0
@@ -409,6 +409,11 @@ static void netfs_rreq_assess_single(strnetfs_single_mark_inode_dirty (rreq->inode); } +/* To do DIO, the cache has to round the size up, so we need to undo +* the rounding. +*/ + rreq->transferred =min (rreq->transferred, rreq->i_size); +if (rreq->iocb) { rreq->iocb->ki_pos += rreq->transferred;if (rreq->iocb->ki_complete) {
Patches currently in stable-queue which might be from [email protected] are
queue-6.18/netfs-fix-folio_queue-enomem-in-writeback-by-adding-.patch queue-6.18/cifs-call-pagecache_isize_extended-in-cifs_setsize-w.patch queue-6.18/afs-fix-the-locking-used-by-afs_get_link.patch queue-6.18/netfs-zero-the-tail-of-a-short-dio-unbuffered-read.patch queue-6.18/netfs-afs-fix-symlink-reading.patch queue-6.18/netfs-fix-zeropoint-update-where-i_size-remote_i_siz.patch queue-6.18/netfs-fix-missing-barriers-when-accessing-stream-sub.patch