diff options
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 39d57bc6cc71..b336cb9ca9a0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -651,6 +651,7 @@ struct block_device { | |||
| 651 | int bd_openers; | 651 | int bd_openers; |
| 652 | struct mutex bd_mutex; /* open/close mutex */ | 652 | struct mutex bd_mutex; /* open/close mutex */ |
| 653 | struct list_head bd_inodes; | 653 | struct list_head bd_inodes; |
| 654 | void * bd_claiming; | ||
| 654 | void * bd_holder; | 655 | void * bd_holder; |
| 655 | int bd_holders; | 656 | int bd_holders; |
| 656 | #ifdef CONFIG_SYSFS | 657 | #ifdef CONFIG_SYSFS |
| @@ -1280,10 +1281,12 @@ static inline int lock_may_write(struct inode *inode, loff_t start, | |||
| 1280 | 1281 | ||
| 1281 | 1282 | ||
| 1282 | struct fasync_struct { | 1283 | struct fasync_struct { |
| 1283 | int magic; | 1284 | spinlock_t fa_lock; |
| 1284 | int fa_fd; | 1285 | int magic; |
| 1285 | struct fasync_struct *fa_next; /* singly linked list */ | 1286 | int fa_fd; |
| 1286 | struct file *fa_file; | 1287 | struct fasync_struct *fa_next; /* singly linked list */ |
| 1288 | struct file *fa_file; | ||
| 1289 | struct rcu_head fa_rcu; | ||
| 1287 | }; | 1290 | }; |
| 1288 | 1291 | ||
| 1289 | #define FASYNC_MAGIC 0x4601 | 1292 | #define FASYNC_MAGIC 0x4601 |
| @@ -1292,8 +1295,6 @@ struct fasync_struct { | |||
| 1292 | extern int fasync_helper(int, struct file *, int, struct fasync_struct **); | 1295 | extern int fasync_helper(int, struct file *, int, struct fasync_struct **); |
| 1293 | /* can be called from interrupts */ | 1296 | /* can be called from interrupts */ |
| 1294 | extern void kill_fasync(struct fasync_struct **, int, int); | 1297 | extern void kill_fasync(struct fasync_struct **, int, int); |
| 1295 | /* only for net: no internal synchronization */ | ||
| 1296 | extern void __kill_fasync(struct fasync_struct *, int, int); | ||
| 1297 | 1298 | ||
| 1298 | extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); | 1299 | extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); |
| 1299 | extern int f_setown(struct file *filp, unsigned long arg, int force); | 1300 | extern int f_setown(struct file *filp, unsigned long arg, int force); |
| @@ -1314,8 +1315,6 @@ extern int send_sigurg(struct fown_struct *fown); | |||
| 1314 | extern struct list_head super_blocks; | 1315 | extern struct list_head super_blocks; |
| 1315 | extern spinlock_t sb_lock; | 1316 | extern spinlock_t sb_lock; |
| 1316 | 1317 | ||
| 1317 | #define sb_entry(list) list_entry((list), struct super_block, s_list) | ||
| 1318 | #define S_BIAS (1<<30) | ||
| 1319 | struct super_block { | 1318 | struct super_block { |
| 1320 | struct list_head s_list; /* Keep this first */ | 1319 | struct list_head s_list; /* Keep this first */ |
| 1321 | dev_t s_dev; /* search index; _not_ kdev_t */ | 1320 | dev_t s_dev; /* search index; _not_ kdev_t */ |
| @@ -1334,12 +1333,11 @@ struct super_block { | |||
| 1334 | struct rw_semaphore s_umount; | 1333 | struct rw_semaphore s_umount; |
| 1335 | struct mutex s_lock; | 1334 | struct mutex s_lock; |
| 1336 | int s_count; | 1335 | int s_count; |
| 1337 | int s_need_sync; | ||
| 1338 | atomic_t s_active; | 1336 | atomic_t s_active; |
| 1339 | #ifdef CONFIG_SECURITY | 1337 | #ifdef CONFIG_SECURITY |
| 1340 | void *s_security; | 1338 | void *s_security; |
| 1341 | #endif | 1339 | #endif |
| 1342 | struct xattr_handler **s_xattr; | 1340 | const struct xattr_handler **s_xattr; |
| 1343 | 1341 | ||
| 1344 | struct list_head s_inodes; /* all inodes */ | 1342 | struct list_head s_inodes; /* all inodes */ |
| 1345 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1343 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ |
| @@ -1431,7 +1429,8 @@ extern void dentry_unhash(struct dentry *dentry); | |||
| 1431 | * VFS file helper functions. | 1429 | * VFS file helper functions. |
| 1432 | */ | 1430 | */ |
| 1433 | extern int file_permission(struct file *, int); | 1431 | extern int file_permission(struct file *, int); |
| 1434 | 1432 | extern void inode_init_owner(struct inode *inode, const struct inode *dir, | |
| 1433 | mode_t mode); | ||
| 1435 | /* | 1434 | /* |
| 1436 | * VFS FS_IOC_FIEMAP helper definitions. | 1435 | * VFS FS_IOC_FIEMAP helper definitions. |
| 1437 | */ | 1436 | */ |
| @@ -1744,6 +1743,7 @@ struct file_system_type { | |||
| 1744 | 1743 | ||
| 1745 | struct lock_class_key s_lock_key; | 1744 | struct lock_class_key s_lock_key; |
| 1746 | struct lock_class_key s_umount_key; | 1745 | struct lock_class_key s_umount_key; |
| 1746 | struct lock_class_key s_vfs_rename_key; | ||
| 1747 | 1747 | ||
| 1748 | struct lock_class_key i_lock_key; | 1748 | struct lock_class_key i_lock_key; |
| 1749 | struct lock_class_key i_mutex_key; | 1749 | struct lock_class_key i_mutex_key; |
| @@ -1781,8 +1781,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *, | |||
| 1781 | const struct super_operations *ops, unsigned long, | 1781 | const struct super_operations *ops, unsigned long, |
| 1782 | struct vfsmount *mnt); | 1782 | struct vfsmount *mnt); |
| 1783 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1783 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
| 1784 | int __put_super_and_need_restart(struct super_block *sb); | ||
| 1785 | void put_super(struct super_block *sb); | ||
| 1786 | 1784 | ||
| 1787 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1785 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
| 1788 | #define fops_get(fops) \ | 1786 | #define fops_get(fops) \ |
| @@ -1802,6 +1800,8 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
| 1802 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | 1800 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, |
| 1803 | struct vfsmount *); | 1801 | struct vfsmount *); |
| 1804 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1802 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
| 1803 | extern int freeze_super(struct super_block *super); | ||
| 1804 | extern int thaw_super(struct super_block *super); | ||
| 1805 | 1805 | ||
| 1806 | extern int current_umask(void); | 1806 | extern int current_umask(void); |
| 1807 | 1807 | ||
| @@ -2087,9 +2087,9 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping, | |||
| 2087 | extern int filemap_fdatawrite_range(struct address_space *mapping, | 2087 | extern int filemap_fdatawrite_range(struct address_space *mapping, |
| 2088 | loff_t start, loff_t end); | 2088 | loff_t start, loff_t end); |
| 2089 | 2089 | ||
| 2090 | extern int vfs_fsync_range(struct file *file, struct dentry *dentry, | 2090 | extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, |
| 2091 | loff_t start, loff_t end, int datasync); | 2091 | int datasync); |
| 2092 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); | 2092 | extern int vfs_fsync(struct file *file, int datasync); |
| 2093 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); | 2093 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); |
| 2094 | extern void sync_supers(void); | 2094 | extern void sync_supers(void); |
| 2095 | extern void emergency_sync(void); | 2095 | extern void emergency_sync(void); |
| @@ -2315,8 +2315,9 @@ extern int vfs_fstatat(int , char __user *, struct kstat *, int); | |||
| 2315 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2315 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
| 2316 | unsigned long arg); | 2316 | unsigned long arg); |
| 2317 | extern int __generic_block_fiemap(struct inode *inode, | 2317 | extern int __generic_block_fiemap(struct inode *inode, |
| 2318 | struct fiemap_extent_info *fieinfo, u64 start, | 2318 | struct fiemap_extent_info *fieinfo, |
| 2319 | u64 len, get_block_t *get_block); | 2319 | loff_t start, loff_t len, |
| 2320 | get_block_t *get_block); | ||
| 2320 | extern int generic_block_fiemap(struct inode *inode, | 2321 | extern int generic_block_fiemap(struct inode *inode, |
| 2321 | struct fiemap_extent_info *fieinfo, u64 start, | 2322 | struct fiemap_extent_info *fieinfo, u64 start, |
| 2322 | u64 len, get_block_t *get_block); | 2323 | u64 len, get_block_t *get_block); |
| @@ -2328,6 +2329,7 @@ extern struct super_block *get_super(struct block_device *); | |||
| 2328 | extern struct super_block *get_active_super(struct block_device *bdev); | 2329 | extern struct super_block *get_active_super(struct block_device *bdev); |
| 2329 | extern struct super_block *user_get_super(dev_t); | 2330 | extern struct super_block *user_get_super(dev_t); |
| 2330 | extern void drop_super(struct super_block *sb); | 2331 | extern void drop_super(struct super_block *sb); |
| 2332 | extern void iterate_supers(void (*)(struct super_block *, void *), void *); | ||
| 2331 | 2333 | ||
| 2332 | extern int dcache_dir_open(struct inode *, struct file *); | 2334 | extern int dcache_dir_open(struct inode *, struct file *); |
| 2333 | extern int dcache_dir_close(struct inode *, struct file *); | 2335 | extern int dcache_dir_close(struct inode *, struct file *); |
| @@ -2361,6 +2363,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
| 2361 | 2363 | ||
| 2362 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, | 2364 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
| 2363 | loff_t *ppos, const void *from, size_t available); | 2365 | loff_t *ppos, const void *from, size_t available); |
| 2366 | extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos, | ||
| 2367 | const void __user *from, size_t count); | ||
| 2364 | 2368 | ||
| 2365 | extern int simple_fsync(struct file *, struct dentry *, int); | 2369 | extern int simple_fsync(struct file *, struct dentry *, int); |
| 2366 | 2370 | ||
