summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds2019-07-11 04:21:38 +0200
committerLinus Torvalds2019-07-11 04:21:38 +0200
commit988052f47adc5c3b0b004180b59bb3761d91b752 (patch)
tree044dbcb77fa966b01ad1a4c9b211dccaa62b29a0 /include/linux/fs.h
parentRevert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/k... (diff)
parentlocks: eliminate false positive conflicts for write lease (diff)
downloadkernel-qcow2-linux-988052f47adc5c3b0b004180b59bb3761d91b752.tar.gz
kernel-qcow2-linux-988052f47adc5c3b0b004180b59bb3761d91b752.tar.xz
kernel-qcow2-linux-988052f47adc5c3b0b004180b59bb3761d91b752.zip
Merge tag 'locks-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
Pull file locking updates from Jeff Layton: "Just a couple of small lease-related patches this cycle. One from Ira to add a new tracepoint that fires during lease conflict checks, and another patch from Amir to reduce false positives when checking for lease conflicts" * tag 'locks-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: eliminate false positive conflicts for write lease locks: Add trace_leases_conflict
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c564cf3f48d9..4fb399b77327 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -694,7 +694,7 @@ struct inode {
atomic_t i_count;
atomic_t i_dio_count;
atomic_t i_writecount;
-#ifdef CONFIG_IMA
+#if defined(CONFIG_IMA) || defined(CONFIG_FILE_LOCKING)
atomic_t i_readcount; /* struct files open RO */
#endif
union {
@@ -2890,7 +2890,7 @@ static inline bool inode_is_open_for_write(const struct inode *inode)
return atomic_read(&inode->i_writecount) > 0;
}
-#ifdef CONFIG_IMA
+#if defined(CONFIG_IMA) || defined(CONFIG_FILE_LOCKING)
static inline void i_readcount_dec(struct inode *inode)
{
BUG_ON(!atomic_read(&inode->i_readcount));