Skip to content

Commit

Permalink
exfat: fix kernel oops
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Jan 17, 2024
1 parent 7a111ad commit ec9897c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
struct inode *inode = mapping->host;
struct exfat_inode_info *ei = EXFAT_I(inode);
loff_t pos = iocb->ki_pos;
loff_t size = iocb->ki_pos + iov_iter_count(iter);
loff_t size = pos + iov_iter_count(iter);
int rw = iov_iter_rw(iter);
ssize_t ret;

Expand All @@ -614,9 +614,7 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
if (ret < 0) {
if (rw == WRITE)
exfat_write_failed(mapping, size);

if (ret != -EIOCBQUEUED)
return ret;
return ret;
} else
size = pos + ret;

Expand Down

0 comments on commit ec9897c

Please sign in to comment.