diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 46 |
1 files changed, 10 insertions, 36 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index a09e17c8f5fd..562d2855cf30 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -95,8 +95,12 @@ struct inodes_stat_t { | |||
95 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ | 95 | #define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */ |
96 | #define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) | 96 | #define READ_SYNC (READ | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) |
97 | #define READ_META (READ | (1 << BIO_RW_META)) | 97 | #define READ_META (READ | (1 << BIO_RW_META)) |
98 | #define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) | 98 | #define WRITE_SYNC_PLUG (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) |
99 | #define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) | 99 | #define WRITE_SYNC (WRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) |
100 | #define WRITE_ODIRECT (WRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_UNPLUG)) | ||
101 | #define SWRITE_SYNC_PLUG \ | ||
102 | (SWRITE | (1 << BIO_RW_SYNCIO) | (1 << BIO_RW_NOIDLE)) | ||
103 | #define SWRITE_SYNC (SWRITE_SYNC_PLUG | (1 << BIO_RW_UNPLUG)) | ||
100 | #define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) | 104 | #define WRITE_BARRIER (WRITE | (1 << BIO_RW_BARRIER)) |
101 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) | 105 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) |
102 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) | 106 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) |
@@ -1695,6 +1699,9 @@ struct file_system_type { | |||
1695 | struct lock_class_key i_alloc_sem_key; | 1699 | struct lock_class_key i_alloc_sem_key; |
1696 | }; | 1700 | }; |
1697 | 1701 | ||
1702 | extern int get_sb_ns(struct file_system_type *fs_type, int flags, void *data, | ||
1703 | int (*fill_super)(struct super_block *, void *, int), | ||
1704 | struct vfsmount *mnt); | ||
1698 | extern int get_sb_bdev(struct file_system_type *fs_type, | 1705 | extern int get_sb_bdev(struct file_system_type *fs_type, |
1699 | int flags, const char *dev_name, void *data, | 1706 | int flags, const char *dev_name, void *data, |
1700 | int (*fill_super)(struct super_block *, void *, int), | 1707 | int (*fill_super)(struct super_block *, void *, int), |
@@ -2337,19 +2344,7 @@ ssize_t simple_transaction_read(struct file *file, char __user *buf, | |||
2337 | size_t size, loff_t *pos); | 2344 | size_t size, loff_t *pos); |
2338 | int simple_transaction_release(struct inode *inode, struct file *file); | 2345 | int simple_transaction_release(struct inode *inode, struct file *file); |
2339 | 2346 | ||
2340 | static inline void simple_transaction_set(struct file *file, size_t n) | 2347 | void simple_transaction_set(struct file *file, size_t n); |
2341 | { | ||
2342 | struct simple_transaction_argresp *ar = file->private_data; | ||
2343 | |||
2344 | BUG_ON(n > SIMPLE_TRANSACTION_LIMIT); | ||
2345 | |||
2346 | /* | ||
2347 | * The barrier ensures that ar->size will really remain zero until | ||
2348 | * ar->data is ready for reading. | ||
2349 | */ | ||
2350 | smp_mb(); | ||
2351 | ar->size = n; | ||
2352 | } | ||
2353 | 2348 | ||
2354 | /* | 2349 | /* |
2355 | * simple attribute files | 2350 | * simple attribute files |
@@ -2396,27 +2391,6 @@ ssize_t simple_attr_read(struct file *file, char __user *buf, | |||
2396 | ssize_t simple_attr_write(struct file *file, const char __user *buf, | 2391 | ssize_t simple_attr_write(struct file *file, const char __user *buf, |
2397 | size_t len, loff_t *ppos); | 2392 | size_t len, loff_t *ppos); |
2398 | 2393 | ||
2399 | |||
2400 | #ifdef CONFIG_SECURITY | ||
2401 | static inline char *alloc_secdata(void) | ||
2402 | { | ||
2403 | return (char *)get_zeroed_page(GFP_KERNEL); | ||
2404 | } | ||
2405 | |||
2406 | static inline void free_secdata(void *secdata) | ||
2407 | { | ||
2408 | free_page((unsigned long)secdata); | ||
2409 | } | ||
2410 | #else | ||
2411 | static inline char *alloc_secdata(void) | ||
2412 | { | ||
2413 | return (char *)1; | ||
2414 | } | ||
2415 | |||
2416 | static inline void free_secdata(void *secdata) | ||
2417 | { } | ||
2418 | #endif /* CONFIG_SECURITY */ | ||
2419 | |||
2420 | struct ctl_table; | 2394 | struct ctl_table; |
2421 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, | 2395 | int proc_nr_files(struct ctl_table *table, int write, struct file *filp, |
2422 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2396 | void __user *buffer, size_t *lenp, loff_t *ppos); |