Skip to content
Commit 7b6ccf75 authored by David Howells's avatar David Howells Committed by Greg Kroah-Hartman
Browse files

afs: Fix getattr to report server i_size on dirs, not local size



[ Upstream commit 45f66fa0 ]

Fix afs_getattr() to report the server's idea of the file size of a
directory rather than the local size.  The local size may differ as we edit
the local copy to avoid having to redownload it and we may end up with a
differently structured blob of a different size.

However, if the directory is discarded from the pagecache we then download
it again and the user may see the directory file size apparently change.

Fixes: 63a4681f ("afs: Locally edit directory data for mkdir/create/unlink/...")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2cfce111
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment