• David Howells's avatar
    afs: Fix getattr to report server i_size on dirs, not local size · 45f66fa0
    David Howells authored
    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
    45f66fa0
inode.c 25.3 KB