diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 16:00:36 -0500 |
commit | 78a45c6f067824cf5d0a9fedea7339ac2e28603c (patch) | |
tree | b4f78c8b6b9059ddace0a18c11629b8d2045f793 /include/linux/fs.h | |
parent | f96fe225677b3efb74346ebd56fafe3997b02afa (diff) | |
parent | 29d293b6007b91a4463f05bc8d0b26e0e65c5816 (diff) |
Merge branch 'akpm' (second patch-bomb from Andrew)
Merge second patchbomb from Andrew Morton:
- the rest of MM
- misc fs fixes
- add execveat() syscall
- new ratelimit feature for fault-injection
- decompressor updates
- ipc/ updates
- fallocate feature creep
- fsnotify cleanups
- a few other misc things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (99 commits)
cgroups: Documentation: fix trivial typos and wrong paragraph numberings
parisc: percpu: update comments referring to __get_cpu_var
percpu: update local_ops.txt to reflect this_cpu operations
percpu: remove __get_cpu_var and __raw_get_cpu_var macros
fsnotify: remove destroy_list from fsnotify_mark
fsnotify: unify inode and mount marks handling
fallocate: create FAN_MODIFY and IN_MODIFY events
mm/cma: make kmemleak ignore CMA regions
slub: fix cpuset check in get_any_partial
slab: fix cpuset check in fallback_alloc
shmdt: use i_size_read() instead of ->i_size
ipc/shm.c: fix overly aggressive shmdt() when calls span multiple segments
ipc/msg: increase MSGMNI, remove scaling
ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM
ipc/sem.c: change memory barrier in sem_lock() to smp_rmb()
lib/decompress.c: consistency of compress formats for kernel image
decompress_bunzip2: off by one in get_next_block()
usr/Kconfig: make initrd compression algorithm selection not expert
fault-inject: add ratelimit option
ratelimit: add initialization macro
...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index bb29b02d9bb6..4193a0bd99b0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pid.h> | 18 | #include <linux/pid.h> |
19 | #include <linux/bug.h> | 19 | #include <linux/bug.h> |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/rwsem.h> | ||
21 | #include <linux/capability.h> | 22 | #include <linux/capability.h> |
22 | #include <linux/semaphore.h> | 23 | #include <linux/semaphore.h> |
23 | #include <linux/fiemap.h> | 24 | #include <linux/fiemap.h> |
@@ -401,7 +402,7 @@ struct address_space { | |||
401 | atomic_t i_mmap_writable;/* count VM_SHARED mappings */ | 402 | atomic_t i_mmap_writable;/* count VM_SHARED mappings */ |
402 | struct rb_root i_mmap; /* tree of private and shared mappings */ | 403 | struct rb_root i_mmap; /* tree of private and shared mappings */ |
403 | struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ | 404 | struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */ |
404 | struct mutex i_mmap_mutex; /* protect tree, count, list */ | 405 | struct rw_semaphore i_mmap_rwsem; /* protect tree, count, list */ |
405 | /* Protected by tree_lock together with the radix tree */ | 406 | /* Protected by tree_lock together with the radix tree */ |
406 | unsigned long nrpages; /* number of total pages */ | 407 | unsigned long nrpages; /* number of total pages */ |
407 | unsigned long nrshadows; /* number of shadow entries */ | 408 | unsigned long nrshadows; /* number of shadow entries */ |
@@ -467,6 +468,26 @@ struct block_device { | |||
467 | 468 | ||
468 | int mapping_tagged(struct address_space *mapping, int tag); | 469 | int mapping_tagged(struct address_space *mapping, int tag); |
469 | 470 | ||
471 | static inline void i_mmap_lock_write(struct address_space *mapping) | ||
472 | { | ||
473 | down_write(&mapping->i_mmap_rwsem); | ||
474 | } | ||
475 | |||
476 | static inline void i_mmap_unlock_write(struct address_space *mapping) | ||
477 | { | ||
478 | up_write(&mapping->i_mmap_rwsem); | ||
479 | } | ||
480 | |||
481 | static inline void i_mmap_lock_read(struct address_space *mapping) | ||
482 | { | ||
483 | down_read(&mapping->i_mmap_rwsem); | ||
484 | } | ||
485 | |||
486 | static inline void i_mmap_unlock_read(struct address_space *mapping) | ||
487 | { | ||
488 | up_read(&mapping->i_mmap_rwsem); | ||
489 | } | ||
490 | |||
470 | /* | 491 | /* |
471 | * Might pages of this file be mapped into userspace? | 492 | * Might pages of this file be mapped into userspace? |
472 | */ | 493 | */ |
@@ -2075,6 +2096,7 @@ extern int vfs_open(const struct path *, struct file *, const struct cred *); | |||
2075 | extern struct file * dentry_open(const struct path *, int, const struct cred *); | 2096 | extern struct file * dentry_open(const struct path *, int, const struct cred *); |
2076 | extern int filp_close(struct file *, fl_owner_t id); | 2097 | extern int filp_close(struct file *, fl_owner_t id); |
2077 | 2098 | ||
2099 | extern struct filename *getname_flags(const char __user *, int, int *); | ||
2078 | extern struct filename *getname(const char __user *); | 2100 | extern struct filename *getname(const char __user *); |
2079 | extern struct filename *getname_kernel(const char *); | 2101 | extern struct filename *getname_kernel(const char *); |
2080 | 2102 | ||