summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2010-01-29 15:38:29 -0800
committerThomas Gleixner <tglx@linutronix.de>2010-04-27 17:32:44 +0200
commit3e9014b7ae2e05b53552f6524a2efd5d22a20400 (patch)
treef0a3e4a5fc370e5c0e2905c6ebbd0f68bba1c34d /include
parent6c2613987518fa790e4eb7b2c649051d61cdd599 (diff)
downloadlwn-3e9014b7ae2e05b53552f6524a2efd5d22a20400.tar.gz
lwn-3e9014b7ae2e05b53552f6524a2efd5d22a20400.zip
fs-inode_lock-scale-5
Protect inodes_stat statistics with atomic ops rather than inode_lock. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 659579634f9a..fc4222374cd7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -8,6 +8,7 @@
#include <linux/limits.h>
#include <linux/ioctl.h>
+#include <asm/atomic.h>
/*
* It's silly to have NR_OPEN bigger than NR_FILE, but you can change
@@ -39,8 +40,8 @@ struct files_stat_struct {
};
struct inodes_stat_t {
- int nr_inodes;
- int nr_unused;
+ atomic_t nr_inodes;
+ atomic_t nr_unused;
int dummy[5]; /* padding for sysctl ABI compatibility */
};