Re: cachefiles: cache objects get created on a frozen cache filesystem

From: Christian Brauner

Date: Tue Dec 01 2026 - 06:25:54 EST


On Sat, Nov 28, 2026 at 07:48:40PM +0100, Drif Abdelmalek Mohamed Said wrote:
> Hello everyone, I'd like to take this one unless one of you is already working
> on it.

Sounds fine. It's the same pattern as for ecryptfs and as the xattr
helpers already do since 80887f316729: take mnt_want_write(cache->mnt)
before the parent's inode lock and drop it after. The call sites I know
of are:

- kernel_tmpfile_open() in cachefiles_create_tmpfile()
- vfs_mkdir() in cachefiles_get_directory()
- vfs_rename() in cachefiles_bury_object()
- vfs_unlink() in cachefiles_unlink()
- vfs_link() in cachefiles_commit_tmpfile()

Please double check that there aren't any others.