diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-17 18:05:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-17 18:05:23 -0400 |
commit | c2e7b207058d4ff6a9010430763fb561f307eb67 (patch) | |
tree | 8983947c4d62365de3d98113662ff9e643a42a0f /fs/hfsplus/inode.c | |
parent | c52b76185b7a1b300e5f15ff871c8f45ced3dee9 (diff) | |
parent | 24368aad47dc65b45040d6a31bfd6df1d6f3ec97 (diff) |
Merge branch 'work.preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs cleanups from Al Viro:
"More cleanups from Christoph"
* 'work.preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
nfsd: use RWF_SYNC
fs: add RWF_DSYNC aand RWF_SYNC
ceph: use generic_write_sync
fs: simplify the generic_write_sync prototype
fs: add IOCB_SYNC and IOCB_DSYNC
direct-io: remove the offset argument to dio_complete
direct-io: eliminate the offset argument to ->direct_IO
xfs: eliminate the pos variable in xfs_file_dio_aio_write
filemap: remove the pos argument to generic_file_direct_write
filemap: remove pos variables in generic_file_read_iter
Diffstat (limited to 'fs/hfsplus/inode.c')
-rw-r--r-- | fs/hfsplus/inode.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 037f738c5871..ef9fefe364a6 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -122,8 +122,7 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask) | |||
122 | return res ? try_to_free_buffers(page) : 0; | 122 | return res ? try_to_free_buffers(page) : 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static ssize_t hfsplus_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | 125 | static ssize_t hfsplus_direct_IO(struct kiocb *iocb, struct iov_iter *iter) |
126 | loff_t offset) | ||
127 | { | 126 | { |
128 | struct file *file = iocb->ki_filp; | 127 | struct file *file = iocb->ki_filp; |
129 | struct address_space *mapping = file->f_mapping; | 128 | struct address_space *mapping = file->f_mapping; |
@@ -131,7 +130,7 @@ static ssize_t hfsplus_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | |||
131 | size_t count = iov_iter_count(iter); | 130 | size_t count = iov_iter_count(iter); |
132 | ssize_t ret; | 131 | ssize_t ret; |
133 | 132 | ||
134 | ret = blockdev_direct_IO(iocb, inode, iter, offset, hfsplus_get_block); | 133 | ret = blockdev_direct_IO(iocb, inode, iter, hfsplus_get_block); |
135 | 134 | ||
136 | /* | 135 | /* |
137 | * In case of error extending write may have instantiated a few | 136 | * In case of error extending write may have instantiated a few |
@@ -139,7 +138,7 @@ static ssize_t hfsplus_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | |||
139 | */ | 138 | */ |
140 | if (unlikely(iov_iter_rw(iter) == WRITE && ret < 0)) { | 139 | if (unlikely(iov_iter_rw(iter) == WRITE && ret < 0)) { |
141 | loff_t isize = i_size_read(inode); | 140 | loff_t isize = i_size_read(inode); |
142 | loff_t end = offset + count; | 141 | loff_t end = iocb->ki_pos + count; |
143 | 142 | ||
144 | if (end > isize) | 143 | if (end > isize) |
145 | hfsplus_write_failed(mapping, end); | 144 | hfsplus_write_failed(mapping, end); |