diff options
-rw-r--r-- | fs/ext4/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 635f8ec6ebc6..5c5bc5dafff8 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3378,6 +3378,7 @@ static ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb, | |||
3378 | ssize_t ret; | 3378 | ssize_t ret; |
3379 | int orphan = 0; | 3379 | int orphan = 0; |
3380 | size_t count = iov_length(iov, nr_segs); | 3380 | size_t count = iov_length(iov, nr_segs); |
3381 | int retries = 0; | ||
3381 | 3382 | ||
3382 | if (rw == WRITE) { | 3383 | if (rw == WRITE) { |
3383 | loff_t final_size = offset + count; | 3384 | loff_t final_size = offset + count; |
@@ -3400,9 +3401,12 @@ static ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb, | |||
3400 | } | 3401 | } |
3401 | } | 3402 | } |
3402 | 3403 | ||
3404 | retry: | ||
3403 | ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, | 3405 | ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, |
3404 | offset, nr_segs, | 3406 | offset, nr_segs, |
3405 | ext4_get_block, NULL); | 3407 | ext4_get_block, NULL); |
3408 | if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries)) | ||
3409 | goto retry; | ||
3406 | 3410 | ||
3407 | if (orphan) { | 3411 | if (orphan) { |
3408 | int err; | 3412 | int err; |