aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-17 18:05:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-17 18:05:23 -0400
commitc2e7b207058d4ff6a9010430763fb561f307eb67 (patch)
tree8983947c4d62365de3d98113662ff9e643a42a0f /fs/udf
parentc52b76185b7a1b300e5f15ff871c8f45ced3dee9 (diff)
parent24368aad47dc65b45040d6a31bfd6df1d6f3ec97 (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/udf')
-rw-r--r--fs/udf/file.c7
-rw-r--r--fs/udf/inode.c7
2 files changed, 5 insertions, 9 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 877ba1c9b461..632570617327 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -99,8 +99,7 @@ static int udf_adinicb_write_begin(struct file *file,
99 return 0; 99 return 0;
100} 100}
101 101
102static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter, 102static ssize_t udf_adinicb_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
103 loff_t offset)
104{ 103{
105 /* Fallback to buffered I/O. */ 104 /* Fallback to buffered I/O. */
106 return 0; 105 return 0;
@@ -153,9 +152,7 @@ out:
153 152
154 if (retval > 0) { 153 if (retval > 0) {
155 mark_inode_dirty(inode); 154 mark_inode_dirty(inode);
156 err = generic_write_sync(file, iocb->ki_pos - retval, retval); 155 retval = generic_write_sync(iocb, retval);
157 if (err < 0)
158 retval = err;
159 } 156 }
160 157
161 return retval; 158 return retval;
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 2dc461eeb415..f323aff740ef 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -214,8 +214,7 @@ static int udf_write_begin(struct file *file, struct address_space *mapping,
214 return ret; 214 return ret;
215} 215}
216 216
217static ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter, 217static ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
218 loff_t offset)
219{ 218{
220 struct file *file = iocb->ki_filp; 219 struct file *file = iocb->ki_filp;
221 struct address_space *mapping = file->f_mapping; 220 struct address_space *mapping = file->f_mapping;
@@ -223,9 +222,9 @@ static ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
223 size_t count = iov_iter_count(iter); 222 size_t count = iov_iter_count(iter);
224 ssize_t ret; 223 ssize_t ret;
225 224
226 ret = blockdev_direct_IO(iocb, inode, iter, offset, udf_get_block); 225 ret = blockdev_direct_IO(iocb, inode, iter, udf_get_block);
227 if (unlikely(ret < 0 && iov_iter_rw(iter) == WRITE)) 226 if (unlikely(ret < 0 && iov_iter_rw(iter) == WRITE))
228 udf_write_failed(mapping, offset + count); 227 udf_write_failed(mapping, iocb->ki_pos + count);
229 return ret; 228 return ret;
230} 229}
231 230