]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
vfs: Provide S_KERNEL_FILE inode flag
authorDavid Howells <dhowells@redhat.com>
Mon, 10 Feb 2020 10:00:21 +0000 (10:00 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 15:41:56 +0000 (15:41 +0000)
Provide an S_KERNEL_FILE inode flag that a kernel service, e.g. cachefiles,
can set to ward off other kernel services and drivers (including itself)
from using files it is actively using.

Signed-off-by: David Howells <dhowells@redhat.com>
include/linux/fs.h

index 473ea3ff0ad4edcf8d8553590c9201dcdee916ca..d4ec20f51129ec78eb4ef94a1962149c29a6336e 100644 (file)
@@ -2249,6 +2249,7 @@ struct super_operations {
 #define S_ENCRYPTED    (1 << 14) /* Encrypted file (using fs/crypto/) */
 #define S_CASEFOLD     (1 << 15) /* Casefolded file */
 #define S_VERITY       (1 << 16) /* Verity file (using fs/verity/) */
+#define S_KERNEL_FILE  (1 << 17) /* File is in use by the kernel (eg. fs/cachefiles) */
 
 /*
  * Note that nosuid etc flags are inode-specific: setting some file-system