Re: cachefiles: cache objects get created on a frozen cache filesystem
From: Drif Abdelmalek Mohamed Said
Date: Tue Dec 01 2026 - 14:55:11 EST
Hello,
I sent a patch for freeze protection in cachefiles, here is the link:
https://lore.kernel.org/all/20261201194842.10572-1-drifabdelmalekmohamedsaid@xxxxxxxxx/
> 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.
It's not entirely like that, because, as i specified in commit message
of the patch, some functions like cachefiles_bury_object and cachefiles_unlink
assume the inode lock is already taken, so freeze protection is added to their
callers.
Christian, you can also check the patch for ecryptfs fixes here:
https://lore.kernel.org/all/20261127195500.1414-1-drifabdelmalekmohamedsaid@xxxxxxxxx/
Cordially