aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandan Rajendra <chandan@linux.vnet.ibm.com>2018-11-19 10:53:21 +0530
committerTheodore Ts'o <tytso@mit.edu>2018-11-26 11:54:55 -0500
commita3ec71a8319f30d942811193a8667eccc4d74d51 (patch)
tree689337d0a2ff0e1541174dc00b4bdf5b67e6c5ff
parentc23c1249adaa293cf43ed749579de07923679002 (diff)
downloadfscrypt-test-working.tar.gz
Add S_VERITY and IS_VERITY()test-working
Similar to S_ENCRYPTED/IS_ENCRYPTED(), this commit adds S_VERITY/IS_VERITY() to be able to check if a VFS inode has verity information associated with it. Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2f424242abb0d4..f3887fcfade4c5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1956,6 +1956,7 @@ struct super_operations {
#define S_DAX 0 /* Make all the DAX code disappear */
#endif
#define S_ENCRYPTED 16384 /* Encrypted file (using fs/crypto/) */
+#define S_VERITY 32768 /* File with fsverity info (using fs/verity) */
/*
* Note that nosuid etc flags are inode-specific: setting some file-system
@@ -1996,6 +1997,7 @@ static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags
#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
#define IS_DAX(inode) ((inode)->i_flags & S_DAX)
#define IS_ENCRYPTED(inode) ((inode)->i_flags & S_ENCRYPTED)
+#define IS_VERITY(inode) ((inode)->i_flags & S_VERITY)
#define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \
(inode)->i_rdev == WHITEOUT_DEV)