aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 3451d23c3bae..2978a2a17a59 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1816,9 +1816,8 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
1816 } 1816 }
1817 1817
1818retry: 1818retry:
1819 ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 1819 ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
1820 offset, nr_segs, 1820 ext3_get_block);
1821 ext3_get_block, NULL);
1822 /* 1821 /*
1823 * In case of error extending write may have instantiated a few 1822 * In case of error extending write may have instantiated a few
1824 * blocks outside i_size. Trim these off again. 1823 * blocks outside i_size. Trim these off again.
@@ -3216,6 +3215,9 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
3216 ext3_journal_stop(handle); 3215 ext3_journal_stop(handle);
3217 } 3216 }
3218 3217
3218 if (attr->ia_valid & ATTR_SIZE)
3219 inode_dio_wait(inode);
3220
3219 if (S_ISREG(inode->i_mode) && 3221 if (S_ISREG(inode->i_mode) &&
3220 attr->ia_valid & ATTR_SIZE && attr->ia_size < inode->i_size) { 3222 attr->ia_valid & ATTR_SIZE && attr->ia_size < inode->i_size) {
3221 handle_t *handle; 3223 handle_t *handle;