Skip to content

Commit 49a4be2

Browse files
committed
Merge tag 'exfat-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat
Pull exfat fix from Namjae Jeon: - Fix BUG in iov_iter_revert reported from syzbot * tag 'exfat-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix zero the unwritten part for dio read
2 parents 5c24e4e + 0991abe commit 49a4be2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/exfat/inode.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
501501
struct inode *inode = mapping->host;
502502
struct exfat_inode_info *ei = EXFAT_I(inode);
503503
loff_t pos = iocb->ki_pos;
504-
loff_t size = iocb->ki_pos + iov_iter_count(iter);
504+
loff_t size = pos + iov_iter_count(iter);
505505
int rw = iov_iter_rw(iter);
506506
ssize_t ret;
507507

@@ -525,11 +525,10 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
525525
*/
526526
ret = blockdev_direct_IO(iocb, inode, iter, exfat_get_block);
527527
if (ret < 0) {
528-
if (rw == WRITE)
528+
if (rw == WRITE && ret != -EIOCBQUEUED)
529529
exfat_write_failed(mapping, size);
530530

531-
if (ret != -EIOCBQUEUED)
532-
return ret;
531+
return ret;
533532
} else
534533
size = pos + ret;
535534

0 commit comments

Comments
 (0)