]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cachefiles: Fix file burial to take lock when unsetting S_KERNEL_FILE
authorDavid Howells <dhowells@redhat.com>
Thu, 25 Jun 2026 14:06:22 +0000 (15:06 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 1 Jul 2026 13:26:28 +0000 (15:26 +0200)
Fix cachefiles_bury_object() to lock the inode of the file being buried
whilst it unsets the S_KERNEL_FILE flag.

Fixes: 07a90e97400c ("cachefiles: Implement culling daemon commands")
Closes: https://sashiko.dev/#/patchset/20260616100821.2062304-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260625140640.3116900-5-dhowells@redhat.com
cc: Paulo Alcantara <pc@manguebit.org>
cc: NeilBrown <neil@brown.name>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/cachefiles/namei.c

index 67793898148b9ddc317fd53487c3c972cea4d4e5..8a9f6be15828ba2f92d024a347b853584cb80115 100644 (file)
@@ -374,7 +374,7 @@ try_again:
                                            "Rename failed with error %d", ret);
        }
 
-       __cachefiles_unmark_inode_in_use(object, d_inode(rep));
+       cachefiles_do_unmark_inode_in_use(object, d_inode(rep));
        end_renaming(&rd);
        _leave(" = 0");
        return 0;