diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f813bc8266aa..dba4cbd157ee 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; |
@@ -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,7 +1097,7 @@ 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 super_block *); |
@@ -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; |
@@ -1743,7 +1747,7 @@ extern int dcache_dir_close(struct inode *, struct file *); | |||
1743 | extern loff_t dcache_dir_lseek(struct file *, loff_t, int); | 1747 | extern loff_t dcache_dir_lseek(struct file *, loff_t, int); |
1744 | extern int dcache_readdir(struct file *, void *, filldir_t); | 1748 | extern int dcache_readdir(struct file *, void *, filldir_t); |
1745 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 1749 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
1746 | extern int simple_statfs(struct super_block *, struct kstatfs *); | 1750 | extern int simple_statfs(struct dentry *, struct kstatfs *); |
1747 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); | 1751 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); |
1748 | extern int simple_unlink(struct inode *, struct dentry *); | 1752 | extern int simple_unlink(struct inode *, struct dentry *); |
1749 | extern int simple_rmdir(struct inode *, struct dentry *); | 1753 | extern int simple_rmdir(struct inode *, struct dentry *); |
@@ -1769,7 +1773,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
1769 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 1773 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); |
1770 | 1774 | ||
1771 | #ifdef CONFIG_MIGRATION | 1775 | #ifdef CONFIG_MIGRATION |
1772 | extern int buffer_migrate_page(struct page *, struct page *); | 1776 | extern int buffer_migrate_page(struct address_space *, |
1777 | struct page *, struct page *); | ||
1773 | #else | 1778 | #else |
1774 | #define buffer_migrate_page NULL | 1779 | #define buffer_migrate_page NULL |
1775 | #endif | 1780 | #endif |