diff options
| author | Nick Piggin <npiggin@suse.de> | 2010-01-29 18:38:29 -0500 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-27 11:32:44 -0400 |
| commit | 3e9014b7ae2e05b53552f6524a2efd5d22a20400 (patch) | |
| tree | f0a3e4a5fc370e5c0e2905c6ebbd0f68bba1c34d /include/linux | |
| parent | 6c2613987518fa790e4eb7b2c649051d61cdd599 (diff) | |
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/linux')
| -rw-r--r-- | include/linux/fs.h | 5 |
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 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/limits.h> | 9 | #include <linux/limits.h> |
| 10 | #include <linux/ioctl.h> | 10 | #include <linux/ioctl.h> |
| 11 | #include <asm/atomic.h> | ||
| 11 | 12 | ||
| 12 | /* | 13 | /* |
| 13 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change | 14 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change |
| @@ -39,8 +40,8 @@ struct files_stat_struct { | |||
| 39 | }; | 40 | }; |
| 40 | 41 | ||
| 41 | struct inodes_stat_t { | 42 | struct inodes_stat_t { |
| 42 | int nr_inodes; | 43 | atomic_t nr_inodes; |
| 43 | int nr_unused; | 44 | atomic_t nr_unused; |
| 44 | int dummy[5]; /* padding for sysctl ABI compatibility */ | 45 | int dummy[5]; /* padding for sysctl ABI compatibility */ |
| 45 | }; | 46 | }; |
| 46 | 47 | ||
