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
This commit is contained in:
+3
-2
@@ -389,12 +389,13 @@ static void affs_write_failed(struct address_space *mapping, loff_t to)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
struct inode *inode = mapping->host;
|
||||
size_t count = iov_iter_count(iter);
|
||||
loff_t offset = iocb->ki_pos;
|
||||
ssize_t ret;
|
||||
|
||||
if (iov_iter_rw(iter) == WRITE) {
|
||||
@@ -404,7 +405,7 @@ affs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = blockdev_direct_IO(iocb, inode, iter, offset, affs_get_block);
|
||||
ret = blockdev_direct_IO(iocb, inode, iter, affs_get_block);
|
||||
if (ret < 0 && iov_iter_rw(iter) == WRITE)
|
||||
affs_write_failed(mapping, offset + count);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user