aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 57fc70574d20..51978ed43e97 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -173,6 +173,15 @@ struct inodes_stat_t {
173#define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) 173#define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA)
174#define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) 174#define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
175 175
176
177/*
178 * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector
179 * that indicates that they should check the contents of the iovec are
180 * valid, but not check the memory that the iovec elements
181 * points too.
182 */
183#define CHECK_IOVEC_ONLY -1
184
176#define SEL_IN 1 185#define SEL_IN 1
177#define SEL_OUT 2 186#define SEL_OUT 2
178#define SEL_EX 4 187#define SEL_EX 4
@@ -1681,7 +1690,6 @@ struct inode_operations {
1681 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); 1690 ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
1682 ssize_t (*listxattr) (struct dentry *, char *, size_t); 1691 ssize_t (*listxattr) (struct dentry *, char *, size_t);
1683 int (*removexattr) (struct dentry *, const char *); 1692 int (*removexattr) (struct dentry *, const char *);
1684 void (*truncate_range)(struct inode *, loff_t, loff_t);
1685 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, 1693 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
1686 u64 len); 1694 u64 len);
1687 int (*update_time)(struct inode *, struct timespec *, int); 1695 int (*update_time)(struct inode *, struct timespec *, int);
@@ -1692,8 +1700,7 @@ struct seq_file;
1692ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, 1700ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
1693 unsigned long nr_segs, unsigned long fast_segs, 1701 unsigned long nr_segs, unsigned long fast_segs,
1694 struct iovec *fast_pointer, 1702 struct iovec *fast_pointer,
1695 struct iovec **ret_pointer, 1703 struct iovec **ret_pointer);
1696 int check_access);
1697 1704
1698extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); 1705extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
1699extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); 1706extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
@@ -2462,8 +2469,6 @@ enum {
2462}; 2469};
2463 2470
2464void dio_end_io(struct bio *bio, int error); 2471void dio_end_io(struct bio *bio, int error);
2465void inode_dio_wait(struct inode *inode);
2466void inode_dio_done(struct inode *inode);
2467 2472
2468ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, 2473ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
2469 struct block_device *bdev, const struct iovec *iov, loff_t offset, 2474 struct block_device *bdev, const struct iovec *iov, loff_t offset,
@@ -2478,12 +2483,11 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
2478 offset, nr_segs, get_block, NULL, NULL, 2483 offset, nr_segs, get_block, NULL, NULL,
2479 DIO_LOCKING | DIO_SKIP_HOLES); 2484 DIO_LOCKING | DIO_SKIP_HOLES);
2480} 2485}
2481#else
2482static inline void inode_dio_wait(struct inode *inode)
2483{
2484}
2485#endif 2486#endif
2486 2487
2488void inode_dio_wait(struct inode *inode);
2489void inode_dio_done(struct inode *inode);
2490
2487extern const struct file_operations generic_ro_fops; 2491extern const struct file_operations generic_ro_fops;
2488 2492
2489#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) 2493#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))