Re: [PATCH] netfs, afs: Fix symlink reading
From: Paulo Alcantara
Date: Tue Sep 15 2026 - 13:18:56 EST
David Howells <dhowells@xxxxxxxxxx> writes:
> 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.
>
> Fixes: c0410adf3da6 ("afs: Fix the locking used by afs_get_link()")
> cc: Paulo Alcantara <pc@xxxxxxxxxxxxx>
> cc: Marc Dionne <marc.dionne@xxxxxxxxxxxx>
> cc: linux-afs@xxxxxxxxxxxxxxxxxxx
> cc: netfs@xxxxxxxxxxxxxxx
> cc: linux-fsdevel@xxxxxxxxxxxxxxx
Reviewed-by: Paulo Alcantara <pc@xxxxxxxxxxxxx>