diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 39e3d117e3d9..0c5e1c5b03db 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * structures etc. | 6 | * structures etc. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/limits.h> | 9 | #include <linux/limits.h> |
11 | #include <linux/ioctl.h> | 10 | #include <linux/ioctl.h> |
12 | 11 | ||
@@ -377,7 +376,8 @@ struct address_space_operations { | |||
377 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 376 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
378 | int); | 377 | int); |
379 | /* migrate the contents of a page to the specified target */ | 378 | /* migrate the contents of a page to the specified target */ |
380 | int (*migratepage) (struct page *, struct page *); | 379 | int (*migratepage) (struct address_space *, |
380 | struct page *, struct page *); | ||
381 | }; | 381 | }; |
382 | 382 | ||
383 | struct backing_dev_info; | 383 | struct backing_dev_info; |
@@ -392,7 +392,7 @@ struct address_space { | |||
392 | unsigned int truncate_count; /* Cover race condition with truncate */ | 392 | unsigned int truncate_count; /* Cover race condition with truncate */ |
393 | unsigned long nrpages; /* number of total pages */ | 393 | unsigned long nrpages; /* number of total pages */ |
394 | pgoff_t writeback_index;/* writeback starts here */ | 394 | pgoff_t writeback_index;/* writeback starts here */ |
395 | struct address_space_operations *a_ops; /* methods */ | 395 | const struct address_space_operations *a_ops; /* methods */ |
396 | unsigned long flags; /* error bits/gfp mask */ | 396 | unsigned long flags; /* error bits/gfp mask */ |
397 | struct backing_dev_info *backing_dev_info; /* device readahead, etc */ | 397 | struct backing_dev_info *backing_dev_info; /* device readahead, etc */ |
398 | spinlock_t private_lock; /* for use by the address_space */ | 398 | spinlock_t private_lock; /* for use by the address_space */ |
@@ -683,6 +683,7 @@ extern spinlock_t files_lock; | |||
683 | #define FL_FLOCK 2 | 683 | #define FL_FLOCK 2 |
684 | #define FL_ACCESS 8 /* not trying to lock, just looking */ | 684 | #define FL_ACCESS 8 /* not trying to lock, just looking */ |
685 | #define FL_LEASE 32 /* lease held on this file */ | 685 | #define FL_LEASE 32 /* lease held on this file */ |
686 | #define FL_CLOSE 64 /* unlock on close */ | ||
686 | #define FL_SLEEP 128 /* A blocking lock */ | 687 | #define FL_SLEEP 128 /* A blocking lock */ |
687 | 688 | ||
688 | /* | 689 | /* |
@@ -775,7 +776,6 @@ extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_l | |||
775 | extern int posix_lock_file(struct file *, struct file_lock *); | 776 | extern int posix_lock_file(struct file *, struct file_lock *); |
776 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 777 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
777 | extern int posix_unblock_lock(struct file *, struct file_lock *); | 778 | extern int posix_unblock_lock(struct file *, struct file_lock *); |
778 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); | ||
779 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); | 779 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); |
780 | extern int __break_lease(struct inode *inode, unsigned int flags); | 780 | extern int __break_lease(struct inode *inode, unsigned int flags); |
781 | extern void lease_get_mtime(struct inode *, struct timespec *time); | 781 | extern void lease_get_mtime(struct inode *, struct timespec *time); |
@@ -783,7 +783,6 @@ extern int setlease(struct file *, long, struct file_lock **); | |||
783 | extern int lease_modify(struct file_lock **, int); | 783 | extern int lease_modify(struct file_lock **, int); |
784 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 784 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
785 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 785 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
786 | extern void steal_locks(fl_owner_t from); | ||
787 | 786 | ||
788 | struct fasync_struct { | 787 | struct fasync_struct { |
789 | int magic; | 788 | int magic; |
@@ -1026,7 +1025,7 @@ struct file_operations { | |||
1026 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); | 1025 | long (*compat_ioctl) (struct file *, unsigned int, unsigned long); |
1027 | int (*mmap) (struct file *, struct vm_area_struct *); | 1026 | int (*mmap) (struct file *, struct vm_area_struct *); |
1028 | int (*open) (struct inode *, struct file *); | 1027 | int (*open) (struct inode *, struct file *); |
1029 | int (*flush) (struct file *); | 1028 | int (*flush) (struct file *, fl_owner_t id); |
1030 | int (*release) (struct inode *, struct file *); | 1029 | int (*release) (struct inode *, struct file *); |
1031 | int (*fsync) (struct file *, struct dentry *, int datasync); | 1030 | int (*fsync) (struct file *, struct dentry *, int datasync); |
1032 | int (*aio_fsync) (struct kiocb *, int datasync); | 1031 | int (*aio_fsync) (struct kiocb *, int datasync); |
@@ -1098,10 +1097,10 @@ struct super_operations { | |||
1098 | int (*sync_fs)(struct super_block *sb, int wait); | 1097 | int (*sync_fs)(struct super_block *sb, int wait); |
1099 | void (*write_super_lockfs) (struct super_block *); | 1098 | void (*write_super_lockfs) (struct super_block *); |
1100 | void (*unlockfs) (struct super_block *); | 1099 | void (*unlockfs) (struct super_block *); |
1101 | int (*statfs) (struct super_block *, struct kstatfs *); | 1100 | int (*statfs) (struct dentry *, struct kstatfs *); |
1102 | int (*remount_fs) (struct super_block *, int *, char *); | 1101 | int (*remount_fs) (struct super_block *, int *, char *); |
1103 | void (*clear_inode) (struct inode *); | 1102 | void (*clear_inode) (struct inode *); |
1104 | void (*umount_begin) (struct super_block *); | 1103 | void (*umount_begin) (struct vfsmount *, int); |
1105 | 1104 | ||
1106 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1105 | int (*show_options)(struct seq_file *, struct vfsmount *); |
1107 | int (*show_stats)(struct seq_file *, struct vfsmount *); | 1106 | int (*show_stats)(struct seq_file *, struct vfsmount *); |
@@ -1271,23 +1270,26 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent, | |||
1271 | struct file_system_type { | 1270 | struct file_system_type { |
1272 | const char *name; | 1271 | const char *name; |
1273 | int fs_flags; | 1272 | int fs_flags; |
1274 | struct super_block *(*get_sb) (struct file_system_type *, int, | 1273 | int (*get_sb) (struct file_system_type *, int, |
1275 | const char *, void *); | 1274 | const char *, void *, struct vfsmount *); |
1276 | void (*kill_sb) (struct super_block *); | 1275 | void (*kill_sb) (struct super_block *); |
1277 | struct module *owner; | 1276 | struct module *owner; |
1278 | struct file_system_type * next; | 1277 | struct file_system_type * next; |
1279 | struct list_head fs_supers; | 1278 | struct list_head fs_supers; |
1280 | }; | 1279 | }; |
1281 | 1280 | ||
1282 | struct super_block *get_sb_bdev(struct file_system_type *fs_type, | 1281 | extern int get_sb_bdev(struct file_system_type *fs_type, |
1283 | int flags, const char *dev_name, void *data, | 1282 | int flags, const char *dev_name, void *data, |
1284 | int (*fill_super)(struct super_block *, void *, int)); | 1283 | int (*fill_super)(struct super_block *, void *, int), |
1285 | struct super_block *get_sb_single(struct file_system_type *fs_type, | 1284 | struct vfsmount *mnt); |
1285 | extern int get_sb_single(struct file_system_type *fs_type, | ||
1286 | int flags, void *data, | 1286 | int flags, void *data, |
1287 | int (*fill_super)(struct super_block *, void *, int)); | 1287 | int (*fill_super)(struct super_block *, void *, int), |
1288 | struct super_block *get_sb_nodev(struct file_system_type *fs_type, | 1288 | struct vfsmount *mnt); |
1289 | extern int get_sb_nodev(struct file_system_type *fs_type, | ||
1289 | int flags, void *data, | 1290 | int flags, void *data, |
1290 | int (*fill_super)(struct super_block *, void *, int)); | 1291 | int (*fill_super)(struct super_block *, void *, int), |
1292 | struct vfsmount *mnt); | ||
1291 | void generic_shutdown_super(struct super_block *sb); | 1293 | void generic_shutdown_super(struct super_block *sb); |
1292 | void kill_block_super(struct super_block *sb); | 1294 | void kill_block_super(struct super_block *sb); |
1293 | void kill_anon_super(struct super_block *sb); | 1295 | void kill_anon_super(struct super_block *sb); |
@@ -1298,8 +1300,10 @@ struct super_block *sget(struct file_system_type *type, | |||
1298 | int (*test)(struct super_block *,void *), | 1300 | int (*test)(struct super_block *,void *), |
1299 | int (*set)(struct super_block *,void *), | 1301 | int (*set)(struct super_block *,void *), |
1300 | void *data); | 1302 | void *data); |
1301 | struct super_block *get_sb_pseudo(struct file_system_type *, char *, | 1303 | extern int get_sb_pseudo(struct file_system_type *, char *, |
1302 | struct super_operations *ops, unsigned long); | 1304 | struct super_operations *ops, unsigned long, |
1305 | struct vfsmount *mnt); | ||
1306 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | ||
1303 | int __put_super(struct super_block *sb); | 1307 | int __put_super(struct super_block *sb); |
1304 | int __put_super_and_need_restart(struct super_block *sb); | 1308 | int __put_super_and_need_restart(struct super_block *sb); |
1305 | void unnamed_dev_init(void); | 1309 | void unnamed_dev_init(void); |
@@ -1322,7 +1326,7 @@ extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); | |||
1322 | extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | 1326 | extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, |
1323 | struct vfsmount *); | 1327 | struct vfsmount *); |
1324 | 1328 | ||
1325 | extern int vfs_statfs(struct super_block *, struct kstatfs *); | 1329 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
1326 | 1330 | ||
1327 | /* /sys/fs */ | 1331 | /* /sys/fs */ |
1328 | extern struct subsystem fs_subsys; | 1332 | extern struct subsystem fs_subsys; |
@@ -1404,7 +1408,7 @@ extern void bd_forget(struct inode *inode); | |||
1404 | extern void bdput(struct block_device *); | 1408 | extern void bdput(struct block_device *); |
1405 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1409 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1406 | extern const struct file_operations def_blk_fops; | 1410 | extern const struct file_operations def_blk_fops; |
1407 | extern struct address_space_operations def_blk_aops; | 1411 | extern const struct address_space_operations def_blk_aops; |
1408 | extern const struct file_operations def_chr_fops; | 1412 | extern const struct file_operations def_chr_fops; |
1409 | extern const struct file_operations bad_sock_fops; | 1413 | extern const struct file_operations bad_sock_fops; |
1410 | extern const struct file_operations def_fifo_fops; | 1414 | extern const struct file_operations def_fifo_fops; |
@@ -1746,7 +1750,7 @@ extern int dcache_dir_close(struct inode *, struct file *); | |||
1746 | extern loff_t dcache_dir_lseek(struct file *, loff_t, int); | 1750 | extern loff_t dcache_dir_lseek(struct file *, loff_t, int); |
1747 | extern int dcache_readdir(struct file *, void *, filldir_t); | 1751 | extern int dcache_readdir(struct file *, void *, filldir_t); |
1748 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 1752 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
1749 | extern int simple_statfs(struct super_block *, struct kstatfs *); | 1753 | extern int simple_statfs(struct dentry *, struct kstatfs *); |
1750 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); | 1754 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); |
1751 | extern int simple_unlink(struct inode *, struct dentry *); | 1755 | extern int simple_unlink(struct inode *, struct dentry *); |
1752 | extern int simple_rmdir(struct inode *, struct dentry *); | 1756 | extern int simple_rmdir(struct inode *, struct dentry *); |
@@ -1766,13 +1770,14 @@ extern struct inode_operations simple_dir_inode_operations; | |||
1766 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 1770 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
1767 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1771 | struct dentry *d_alloc_name(struct dentry *, const char *); |
1768 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1772 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
1769 | extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); | 1773 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
1770 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 1774 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
1771 | 1775 | ||
1772 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 1776 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); |
1773 | 1777 | ||
1774 | #ifdef CONFIG_MIGRATION | 1778 | #ifdef CONFIG_MIGRATION |
1775 | extern int buffer_migrate_page(struct page *, struct page *); | 1779 | extern int buffer_migrate_page(struct address_space *, |
1780 | struct page *, struct page *); | ||
1776 | #else | 1781 | #else |
1777 | #define buffer_migrate_page NULL | 1782 | #define buffer_migrate_page NULL |
1778 | #endif | 1783 | #endif |