linux/fs/afs
Marc Dionne 274c0b0c2f afs: Avoid endless loop if file is larger than expected
[ Upstream commit 9ea4eff4b6 ]

afs_read_dir fetches an amount of data that's based on what the inode
size is thought to be.  If the file on the server is larger than what
was fetched, the code rechecks i_size and retries.  If the local i_size
was not properly updated, this can lead to an endless loop of fetching
i_size from the server and noticing each time that the size is larger on
the server.

If it is known that the remote size is larger than i_size, bump up the
fetch size to that size.

Fixes: f3ddee8dc4 ("afs: Fix directory handling")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:38 +09:00
..
addr_list.c
afs_cm.h
afs_fs.h
afs_vl.h
afs.h
callback.c
cell.c
cmservice.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
dir_edit.c
dir_silly.c
dir.c afs: Avoid endless loop if file is larger than expected 2023-05-11 23:03:38 +09:00
dynroot.c
file.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
flock.c
fs_operation.c
fs_probe.c afs: Fix lost servers_outstanding count 2022-12-31 13:33:08 +01:00
fsclient.c
inode.c afs: Fix getattr to report server i_size on dirs, not local size 2023-05-11 23:03:38 +09:00
internal.h use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
Kconfig
main.c
Makefile
misc.c
mntpt.c
proc.c
protocol_afs.h
protocol_uae.h
protocol_yfs.h
rotate.c
rxrpc.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
security.c
server_list.c
server.c afs: Fix server->active leak in afs_put_server 2022-11-30 10:02:37 -08:00
super.c
vl_alias.c
vl_list.c
vl_probe.c
vl_rotate.c
vlclient.c
volume.c
write.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
xattr.c
xdr_fs.h
yfsclient.c