aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index b29eb6747116..5d9213963fae 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -851,8 +851,7 @@ static sector_t ext2_bmap(struct address_space *mapping, sector_t block)
851} 851}
852 852
853static ssize_t 853static ssize_t
854ext2_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, 854ext2_direct_IO(struct kiocb *iocb, struct iov_iter *iter, loff_t offset)
855 loff_t offset)
856{ 855{
857 struct file *file = iocb->ki_filp; 856 struct file *file = iocb->ki_filp;
858 struct address_space *mapping = file->f_mapping; 857 struct address_space *mapping = file->f_mapping;
@@ -861,12 +860,12 @@ ext2_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
861 ssize_t ret; 860 ssize_t ret;
862 861
863 if (IS_DAX(inode)) 862 if (IS_DAX(inode))
864 ret = dax_do_io(rw, iocb, inode, iter, offset, ext2_get_block, 863 ret = dax_do_io(iocb, inode, iter, offset, ext2_get_block, NULL,
865 NULL, DIO_LOCKING); 864 DIO_LOCKING);
866 else 865 else
867 ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, 866 ret = blockdev_direct_IO(iocb, inode, iter, offset,
868 ext2_get_block); 867 ext2_get_block);
869 if (ret < 0 && (rw & WRITE)) 868 if (ret < 0 && iov_iter_rw(iter) == WRITE)
870 ext2_write_failed(mapping, offset + count); 869 ext2_write_failed(mapping, offset + count);
871 return ret; 870 return ret;
872} 871}