diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 109 |
1 files changed, 71 insertions, 38 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 128d0082522c..408fe89498f4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -65,6 +65,11 @@ extern int dir_notify_enable; | |||
65 | #define FMODE_PREAD 8 | 65 | #define FMODE_PREAD 8 |
66 | #define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ | 66 | #define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ |
67 | 67 | ||
68 | /* File is being opened for execution. Primary users of this flag are | ||
69 | distributed filesystems that can use it to achieve correct ETXTBUSY | ||
70 | behavior for cross-node execution/opening_for_writing of files */ | ||
71 | #define FMODE_EXEC 16 | ||
72 | |||
68 | #define RW_MASK 1 | 73 | #define RW_MASK 1 |
69 | #define RWA_MASK 2 | 74 | #define RWA_MASK 2 |
70 | #define READ 0 | 75 | #define READ 0 |
@@ -103,7 +108,9 @@ extern int dir_notify_enable; | |||
103 | #define MS_BIND 4096 | 108 | #define MS_BIND 4096 |
104 | #define MS_MOVE 8192 | 109 | #define MS_MOVE 8192 |
105 | #define MS_REC 16384 | 110 | #define MS_REC 16384 |
106 | #define MS_VERBOSE 32768 | 111 | #define MS_VERBOSE 32768 /* War is peace. Verbosity is silence. |
112 | MS_VERBOSE is deprecated. */ | ||
113 | #define MS_SILENT 32768 | ||
107 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | 114 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ |
108 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ | 115 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ |
109 | #define MS_PRIVATE (1<<18) /* change to private */ | 116 | #define MS_PRIVATE (1<<18) /* change to private */ |
@@ -197,6 +204,10 @@ extern int dir_notify_enable; | |||
197 | #define BLKBSZGET _IOR(0x12,112,size_t) | 204 | #define BLKBSZGET _IOR(0x12,112,size_t) |
198 | #define BLKBSZSET _IOW(0x12,113,size_t) | 205 | #define BLKBSZSET _IOW(0x12,113,size_t) |
199 | #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ | 206 | #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */ |
207 | #define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup) | ||
208 | #define BLKTRACESTART _IO(0x12,116) | ||
209 | #define BLKTRACESTOP _IO(0x12,117) | ||
210 | #define BLKTRACETEARDOWN _IO(0x12,118) | ||
200 | 211 | ||
201 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ | 212 | #define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ |
202 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 213 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
@@ -241,9 +252,6 @@ extern void __init files_init(unsigned long); | |||
241 | struct buffer_head; | 252 | struct buffer_head; |
242 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, | 253 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, |
243 | struct buffer_head *bh_result, int create); | 254 | struct buffer_head *bh_result, int create); |
244 | typedef int (get_blocks_t)(struct inode *inode, sector_t iblock, | ||
245 | unsigned long max_blocks, | ||
246 | struct buffer_head *bh_result, int create); | ||
247 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | 255 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, |
248 | ssize_t bytes, void *private); | 256 | ssize_t bytes, void *private); |
249 | 257 | ||
@@ -339,12 +347,12 @@ struct writeback_control; | |||
339 | struct address_space_operations { | 347 | struct address_space_operations { |
340 | int (*writepage)(struct page *page, struct writeback_control *wbc); | 348 | int (*writepage)(struct page *page, struct writeback_control *wbc); |
341 | int (*readpage)(struct file *, struct page *); | 349 | int (*readpage)(struct file *, struct page *); |
342 | int (*sync_page)(struct page *); | 350 | void (*sync_page)(struct page *); |
343 | 351 | ||
344 | /* Write back some dirty pages from this mapping. */ | 352 | /* Write back some dirty pages from this mapping. */ |
345 | int (*writepages)(struct address_space *, struct writeback_control *); | 353 | int (*writepages)(struct address_space *, struct writeback_control *); |
346 | 354 | ||
347 | /* Set a page dirty */ | 355 | /* Set a page dirty. Return true if this dirtied it */ |
348 | int (*set_page_dirty)(struct page *page); | 356 | int (*set_page_dirty)(struct page *page); |
349 | 357 | ||
350 | int (*readpages)(struct file *filp, struct address_space *mapping, | 358 | int (*readpages)(struct file *filp, struct address_space *mapping, |
@@ -358,7 +366,7 @@ struct address_space_operations { | |||
358 | int (*commit_write)(struct file *, struct page *, unsigned, unsigned); | 366 | int (*commit_write)(struct file *, struct page *, unsigned, unsigned); |
359 | /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ | 367 | /* Unfortunately this kludge is needed for FIBMAP. Don't use it */ |
360 | sector_t (*bmap)(struct address_space *, sector_t); | 368 | sector_t (*bmap)(struct address_space *, sector_t); |
361 | int (*invalidatepage) (struct page *, unsigned long); | 369 | void (*invalidatepage) (struct page *, unsigned long); |
362 | int (*releasepage) (struct page *, gfp_t); | 370 | int (*releasepage) (struct page *, gfp_t); |
363 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 371 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
364 | loff_t offset, unsigned long nr_segs); | 372 | loff_t offset, unsigned long nr_segs); |
@@ -397,11 +405,14 @@ struct block_device { | |||
397 | dev_t bd_dev; /* not a kdev_t - it's a search key */ | 405 | dev_t bd_dev; /* not a kdev_t - it's a search key */ |
398 | struct inode * bd_inode; /* will die */ | 406 | struct inode * bd_inode; /* will die */ |
399 | int bd_openers; | 407 | int bd_openers; |
400 | struct semaphore bd_sem; /* open/close mutex */ | 408 | struct mutex bd_mutex; /* open/close mutex */ |
401 | struct semaphore bd_mount_sem; /* mount mutex */ | 409 | struct mutex bd_mount_mutex; /* mount mutex */ |
402 | struct list_head bd_inodes; | 410 | struct list_head bd_inodes; |
403 | void * bd_holder; | 411 | void * bd_holder; |
404 | int bd_holders; | 412 | int bd_holders; |
413 | #ifdef CONFIG_SYSFS | ||
414 | struct list_head bd_holder_list; | ||
415 | #endif | ||
405 | struct block_device * bd_contains; | 416 | struct block_device * bd_contains; |
406 | unsigned bd_block_size; | 417 | unsigned bd_block_size; |
407 | struct hd_struct * bd_part; | 418 | struct hd_struct * bd_part; |
@@ -479,13 +490,13 @@ struct inode { | |||
479 | unsigned int i_blkbits; | 490 | unsigned int i_blkbits; |
480 | unsigned long i_blksize; | 491 | unsigned long i_blksize; |
481 | unsigned long i_version; | 492 | unsigned long i_version; |
482 | unsigned long i_blocks; | 493 | blkcnt_t i_blocks; |
483 | unsigned short i_bytes; | 494 | unsigned short i_bytes; |
484 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 495 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
485 | struct mutex i_mutex; | 496 | struct mutex i_mutex; |
486 | struct rw_semaphore i_alloc_sem; | 497 | struct rw_semaphore i_alloc_sem; |
487 | struct inode_operations *i_op; | 498 | struct inode_operations *i_op; |
488 | struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 499 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
489 | struct super_block *i_sb; | 500 | struct super_block *i_sb; |
490 | struct file_lock *i_flock; | 501 | struct file_lock *i_flock; |
491 | struct address_space *i_mapping; | 502 | struct address_space *i_mapping; |
@@ -509,7 +520,7 @@ struct inode { | |||
509 | 520 | ||
510 | #ifdef CONFIG_INOTIFY | 521 | #ifdef CONFIG_INOTIFY |
511 | struct list_head inotify_watches; /* watches on this inode */ | 522 | struct list_head inotify_watches; /* watches on this inode */ |
512 | struct semaphore inotify_sem; /* protects the watches list */ | 523 | struct mutex inotify_mutex; /* protects the watches list */ |
513 | #endif | 524 | #endif |
514 | 525 | ||
515 | unsigned long i_state; | 526 | unsigned long i_state; |
@@ -625,7 +636,7 @@ struct file { | |||
625 | } f_u; | 636 | } f_u; |
626 | struct dentry *f_dentry; | 637 | struct dentry *f_dentry; |
627 | struct vfsmount *f_vfsmnt; | 638 | struct vfsmount *f_vfsmnt; |
628 | struct file_operations *f_op; | 639 | const struct file_operations *f_op; |
629 | atomic_t f_count; | 640 | atomic_t f_count; |
630 | unsigned int f_flags; | 641 | unsigned int f_flags; |
631 | mode_t f_mode; | 642 | mode_t f_mode; |
@@ -667,7 +678,6 @@ extern spinlock_t files_lock; | |||
667 | #define FL_POSIX 1 | 678 | #define FL_POSIX 1 |
668 | #define FL_FLOCK 2 | 679 | #define FL_FLOCK 2 |
669 | #define FL_ACCESS 8 /* not trying to lock, just looking */ | 680 | #define FL_ACCESS 8 /* not trying to lock, just looking */ |
670 | #define FL_LOCKD 16 /* lock held by rpc.lockd */ | ||
671 | #define FL_LEASE 32 /* lease held on this file */ | 681 | #define FL_LEASE 32 /* lease held on this file */ |
672 | #define FL_SLEEP 128 /* A blocking lock */ | 682 | #define FL_SLEEP 128 /* A blocking lock */ |
673 | 683 | ||
@@ -731,8 +741,6 @@ struct file_lock { | |||
731 | #define OFFT_OFFSET_MAX INT_LIMIT(off_t) | 741 | #define OFFT_OFFSET_MAX INT_LIMIT(off_t) |
732 | #endif | 742 | #endif |
733 | 743 | ||
734 | extern struct list_head file_lock_list; | ||
735 | |||
736 | #include <linux/fcntl.h> | 744 | #include <linux/fcntl.h> |
737 | 745 | ||
738 | extern int fcntl_getlk(struct file *, struct flock __user *); | 746 | extern int fcntl_getlk(struct file *, struct flock __user *); |
@@ -754,10 +762,10 @@ extern void locks_init_lock(struct file_lock *); | |||
754 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 762 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
755 | extern void locks_remove_posix(struct file *, fl_owner_t); | 763 | extern void locks_remove_posix(struct file *, fl_owner_t); |
756 | extern void locks_remove_flock(struct file *); | 764 | extern void locks_remove_flock(struct file *); |
757 | extern struct file_lock *posix_test_lock(struct file *, struct file_lock *); | 765 | extern int posix_test_lock(struct file *, struct file_lock *, struct file_lock *); |
766 | extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_lock *); | ||
758 | extern int posix_lock_file(struct file *, struct file_lock *); | 767 | extern int posix_lock_file(struct file *, struct file_lock *); |
759 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 768 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
760 | extern void posix_block_lock(struct file_lock *, struct file_lock *); | ||
761 | extern int posix_unblock_lock(struct file *, struct file_lock *); | 769 | extern int posix_unblock_lock(struct file *, struct file_lock *); |
762 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); | 770 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); |
763 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); | 771 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); |
@@ -847,7 +855,7 @@ struct super_block { | |||
847 | * The next field is for VFS *only*. No filesystems have any business | 855 | * The next field is for VFS *only*. No filesystems have any business |
848 | * even looking at it. You had been warned. | 856 | * even looking at it. You had been warned. |
849 | */ | 857 | */ |
850 | struct semaphore s_vfs_rename_sem; /* Kludge */ | 858 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
851 | 859 | ||
852 | /* Granuality of c/m/atime in ns. | 860 | /* Granuality of c/m/atime in ns. |
853 | Cannot be worse than a second */ | 861 | Cannot be worse than a second */ |
@@ -1086,6 +1094,7 @@ struct super_operations { | |||
1086 | void (*umount_begin) (struct super_block *); | 1094 | void (*umount_begin) (struct super_block *); |
1087 | 1095 | ||
1088 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1096 | int (*show_options)(struct seq_file *, struct vfsmount *); |
1097 | int (*show_stats)(struct seq_file *, struct vfsmount *); | ||
1089 | 1098 | ||
1090 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 1099 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
1091 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1100 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
@@ -1115,6 +1124,18 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1115 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1124 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1116 | } | 1125 | } |
1117 | 1126 | ||
1127 | static inline void inode_inc_link_count(struct inode *inode) | ||
1128 | { | ||
1129 | inode->i_nlink++; | ||
1130 | mark_inode_dirty(inode); | ||
1131 | } | ||
1132 | |||
1133 | static inline void inode_dec_link_count(struct inode *inode) | ||
1134 | { | ||
1135 | inode->i_nlink--; | ||
1136 | mark_inode_dirty(inode); | ||
1137 | } | ||
1138 | |||
1118 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); | 1139 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); |
1119 | static inline void file_accessed(struct file *file) | 1140 | static inline void file_accessed(struct file *file) |
1120 | { | 1141 | { |
@@ -1369,11 +1390,11 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
1369 | extern void bd_forget(struct inode *inode); | 1390 | extern void bd_forget(struct inode *inode); |
1370 | extern void bdput(struct block_device *); | 1391 | extern void bdput(struct block_device *); |
1371 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1392 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1372 | extern struct file_operations def_blk_fops; | 1393 | extern const struct file_operations def_blk_fops; |
1373 | extern struct address_space_operations def_blk_aops; | 1394 | extern struct address_space_operations def_blk_aops; |
1374 | extern struct file_operations def_chr_fops; | 1395 | extern const struct file_operations def_chr_fops; |
1375 | extern struct file_operations bad_sock_fops; | 1396 | extern const struct file_operations bad_sock_fops; |
1376 | extern struct file_operations def_fifo_fops; | 1397 | extern const struct file_operations def_fifo_fops; |
1377 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); | 1398 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); |
1378 | extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); | 1399 | extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long); |
1379 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 1400 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
@@ -1381,12 +1402,19 @@ extern int blkdev_get(struct block_device *, mode_t, unsigned); | |||
1381 | extern int blkdev_put(struct block_device *); | 1402 | extern int blkdev_put(struct block_device *); |
1382 | extern int bd_claim(struct block_device *, void *); | 1403 | extern int bd_claim(struct block_device *, void *); |
1383 | extern void bd_release(struct block_device *); | 1404 | extern void bd_release(struct block_device *); |
1405 | #ifdef CONFIG_SYSFS | ||
1406 | extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *); | ||
1407 | extern void bd_release_from_disk(struct block_device *, struct gendisk *); | ||
1408 | #else | ||
1409 | #define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder) | ||
1410 | #define bd_release_from_disk(bdev, disk) bd_release(bdev) | ||
1411 | #endif | ||
1384 | 1412 | ||
1385 | /* fs/char_dev.c */ | 1413 | /* fs/char_dev.c */ |
1386 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1414 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
1387 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1415 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
1388 | extern int register_chrdev(unsigned int, const char *, | 1416 | extern int register_chrdev(unsigned int, const char *, |
1389 | struct file_operations *); | 1417 | const struct file_operations *); |
1390 | extern int unregister_chrdev(unsigned int, const char *); | 1418 | extern int unregister_chrdev(unsigned int, const char *); |
1391 | extern void unregister_chrdev_region(dev_t, unsigned); | 1419 | extern void unregister_chrdev_region(dev_t, unsigned); |
1392 | extern int chrdev_open(struct inode *, struct file *); | 1420 | extern int chrdev_open(struct inode *, struct file *); |
@@ -1416,9 +1444,9 @@ extern void init_special_inode(struct inode *, umode_t, dev_t); | |||
1416 | extern void make_bad_inode(struct inode *); | 1444 | extern void make_bad_inode(struct inode *); |
1417 | extern int is_bad_inode(struct inode *); | 1445 | extern int is_bad_inode(struct inode *); |
1418 | 1446 | ||
1419 | extern struct file_operations read_fifo_fops; | 1447 | extern const struct file_operations read_fifo_fops; |
1420 | extern struct file_operations write_fifo_fops; | 1448 | extern const struct file_operations write_fifo_fops; |
1421 | extern struct file_operations rdwr_fifo_fops; | 1449 | extern const struct file_operations rdwr_fifo_fops; |
1422 | 1450 | ||
1423 | extern int fs_may_remount_ro(struct super_block *); | 1451 | extern int fs_may_remount_ro(struct super_block *); |
1424 | 1452 | ||
@@ -1455,6 +1483,12 @@ extern int filemap_fdatawait(struct address_space *); | |||
1455 | extern int filemap_write_and_wait(struct address_space *mapping); | 1483 | extern int filemap_write_and_wait(struct address_space *mapping); |
1456 | extern int filemap_write_and_wait_range(struct address_space *mapping, | 1484 | extern int filemap_write_and_wait_range(struct address_space *mapping, |
1457 | loff_t lstart, loff_t lend); | 1485 | loff_t lstart, loff_t lend); |
1486 | extern int wait_on_page_writeback_range(struct address_space *mapping, | ||
1487 | pgoff_t start, pgoff_t end); | ||
1488 | extern int __filemap_fdatawrite_range(struct address_space *mapping, | ||
1489 | loff_t start, loff_t end, int sync_mode); | ||
1490 | |||
1491 | extern long do_fsync(struct file *file, int datasync); | ||
1458 | extern void sync_supers(void); | 1492 | extern void sync_supers(void); |
1459 | extern void sync_filesystems(int wait); | 1493 | extern void sync_filesystems(int wait); |
1460 | extern void emergency_sync(void); | 1494 | extern void emergency_sync(void); |
@@ -1534,7 +1568,6 @@ extern void destroy_inode(struct inode *); | |||
1534 | extern struct inode *new_inode(struct super_block *); | 1568 | extern struct inode *new_inode(struct super_block *); |
1535 | extern int remove_suid(struct dentry *); | 1569 | extern int remove_suid(struct dentry *); |
1536 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | 1570 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); |
1537 | extern struct semaphore iprune_sem; | ||
1538 | 1571 | ||
1539 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1572 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1540 | extern void remove_inode_hash(struct inode *); | 1573 | extern void remove_inode_hash(struct inode *); |
@@ -1619,7 +1652,7 @@ static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | |||
1619 | 1652 | ||
1620 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 1653 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
1621 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 1654 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
1622 | unsigned long nr_segs, get_blocks_t get_blocks, dio_iodone_t end_io, | 1655 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
1623 | int lock_type); | 1656 | int lock_type); |
1624 | 1657 | ||
1625 | enum { | 1658 | enum { |
@@ -1630,32 +1663,32 @@ enum { | |||
1630 | 1663 | ||
1631 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | 1664 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, |
1632 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 1665 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
1633 | loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks, | 1666 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
1634 | dio_iodone_t end_io) | 1667 | dio_iodone_t end_io) |
1635 | { | 1668 | { |
1636 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1669 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1637 | nr_segs, get_blocks, end_io, DIO_LOCKING); | 1670 | nr_segs, get_block, end_io, DIO_LOCKING); |
1638 | } | 1671 | } |
1639 | 1672 | ||
1640 | static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | 1673 | static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, |
1641 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 1674 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
1642 | loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks, | 1675 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
1643 | dio_iodone_t end_io) | 1676 | dio_iodone_t end_io) |
1644 | { | 1677 | { |
1645 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1678 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1646 | nr_segs, get_blocks, end_io, DIO_NO_LOCKING); | 1679 | nr_segs, get_block, end_io, DIO_NO_LOCKING); |
1647 | } | 1680 | } |
1648 | 1681 | ||
1649 | static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, | 1682 | static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, |
1650 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 1683 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
1651 | loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks, | 1684 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
1652 | dio_iodone_t end_io) | 1685 | dio_iodone_t end_io) |
1653 | { | 1686 | { |
1654 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1687 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1655 | nr_segs, get_blocks, end_io, DIO_OWN_LOCKING); | 1688 | nr_segs, get_block, end_io, DIO_OWN_LOCKING); |
1656 | } | 1689 | } |
1657 | 1690 | ||
1658 | extern struct file_operations generic_ro_fops; | 1691 | extern const struct file_operations generic_ro_fops; |
1659 | 1692 | ||
1660 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) | 1693 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) |
1661 | 1694 | ||
@@ -1711,9 +1744,9 @@ extern int simple_commit_write(struct file *file, struct page *page, | |||
1711 | 1744 | ||
1712 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); | 1745 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); |
1713 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 1746 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
1714 | extern struct file_operations simple_dir_operations; | 1747 | extern const struct file_operations simple_dir_operations; |
1715 | extern struct inode_operations simple_dir_inode_operations; | 1748 | extern struct inode_operations simple_dir_inode_operations; |
1716 | struct tree_descr { char *name; struct file_operations *ops; int mode; }; | 1749 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
1717 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1750 | struct dentry *d_alloc_name(struct dentry *, const char *); |
1718 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1751 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
1719 | extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); | 1752 | extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); |