On Sat, Jan 24, 2026 at 05:31:04PM -0800, Eric Biggers wrote:
> Maybe do:
>
> if (IS_ENABLED(CONFIG_FS_VERITY) && IS_VERITY(inode)) {
> /*
> * This pairs with the try_cmpxchg in set_mask_bits()
> * used to set the S_VERITY bit in i_flags.
> */
> smp_mb();
> return true;
> }
Is there a reason not to do as DAX did:
+++ b/include/linux/fs.h
@@ -2119,7 +2119,11 @@ extern loff_t vfs_dedupe_file_range_one(struct file
*src_file, loff_t src_pos,
#endif
#define S_ENCRYPTED (1 << 14) /* Encrypted file (using fs/crypto/) */
#define S_CASEFOLD (1 << 15) /* Casefolded file */
+#ifdef CONFIG_FS_VERITY
#define S_VERITY (1 << 16) /* Verity file (using fs/verity/) */
+#else
+#define S_VERITY 0 /* Make all the verity checks disappear */
+#endif
#define S_KERNEL_FILE (1 << 17) /* File is in use by the kernel (eg.
fs/cachefiles) */
#define S_ANON_INODE (1 << 19) /* Inode is an anonymous inode */
and then we can drop the CONFIG_FS_VERITY check here and in (at leaast)
three other places
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel