]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
afs: Fix directory inode initialisation order
authorDavid Howells <dhowells@redhat.com>
Mon, 22 Jun 2026 09:08:40 +0000 (10:08 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 1 Jul 2026 13:26:19 +0000 (15:26 +0200)
commit35b177ef541ae8eefbfbf679c3476bc3fb1eb83c
treed02299a745619ab379ac24782229b68888ec33e7
parent81e985b4c3a6cbcc443fcdcd3ebda7fcc845d459
afs: Fix directory inode initialisation order

Fix afs_inode_init_from_status() to call afs_set_netfs_context() before the
switch to do file type-specific initialisation because local directory
changes don't get uploaded to the server, only stored in the cache.

This requires that the file size be set before, so move that up too.

Without this, NETFS_ICTX_SINGLE_NO_UPLOAD as set on directories gets
clobbered.

Closes: https://sashiko.dev/#/patchset/20260618074903.2374756-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260622090856.2746629-7-dhowells@redhat.com
Fixes: 6dd80936618c ("afs: Use netfslib for directories")
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/afs/inode.c