aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-31 12:22:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-31 14:41:36 -0400
commit1d59d61f606547f0712aa6971f91f71154071c99 (patch)
treecb2fd4b9ce3e3ee9440d566d43ea350221edfc8e /include/linux/fs.h
parent2d117403b30cd7301af60d7d54b279a9f566d10d (diff)
NFS: Ensure that setattr and getattr wait for O_DIRECT write completion
Use the same mechanism as the block devices are using, but move the helper functions from fs/direct-io.c into fs/inode.c to remove the dependency on CONFIG_BLOCK. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Fred Isaman <iisaman@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 038076b27ea4..598a5892ff2b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2453,8 +2453,6 @@ enum {
2453}; 2453};
2454 2454
2455void dio_end_io(struct bio *bio, int error); 2455void dio_end_io(struct bio *bio, int error);
2456void inode_dio_wait(struct inode *inode);
2457void inode_dio_done(struct inode *inode);
2458 2456
2459ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, 2457ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
2460 struct block_device *bdev, const struct iovec *iov, loff_t offset, 2458 struct block_device *bdev, const struct iovec *iov, loff_t offset,
@@ -2469,12 +2467,11 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
2469 offset, nr_segs, get_block, NULL, NULL, 2467 offset, nr_segs, get_block, NULL, NULL,
2470 DIO_LOCKING | DIO_SKIP_HOLES); 2468 DIO_LOCKING | DIO_SKIP_HOLES);
2471} 2469}
2472#else
2473static inline void inode_dio_wait(struct inode *inode)
2474{
2475}
2476#endif 2470#endif
2477 2471
2472void inode_dio_wait(struct inode *inode);
2473void inode_dio_done(struct inode *inode);
2474
2478extern const struct file_operations generic_ro_fops; 2475extern const struct file_operations generic_ro_fops;
2479 2476
2480#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) 2477#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))