mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 01:08:13 -04:00
cachefiles: Fix file burial to take lock when unsetting S_KERNEL_FILE
Fix cachefiles_bury_object() to lock the inode of the file being buried
whilst it unsets the S_KERNEL_FILE flag.
Fixes: 07a90e9740 ("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>
This commit is contained in:
committed by
Christian Brauner
parent
af6830cc12
commit
511a018ed2
@@ -374,7 +374,7 @@ int cachefiles_bury_object(struct cachefiles_cache *cache,
|
||||
"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;
|
||||
|
||||
Reference in New Issue
Block a user