mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
fs/ntfs3: Add missing direct_IO in ntfs_aops_cmpr
The ntfs3 can use the page cache directly, so its address_space_operations
need direct_IO. Exit ntfs_direct_IO() if it is a compressed file.
Fixes: b432163ebd
("fs/ntfs3: Update inode->i_mapping->a_ops on compression state")
Reported-by: syzbot+e36cc3297bd3afd25e19@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e36cc3297bd3afd25e19
Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
af5cab0e5b
commit
8b26c8c376
|
@ -805,6 +805,10 @@ static ssize_t ntfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
|
|||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
if (is_compressed(ni)) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = blockdev_direct_IO(iocb, inode, iter,
|
||||
wr ? ntfs_get_block_direct_IO_W :
|
||||
|
@ -2068,5 +2072,6 @@ const struct address_space_operations ntfs_aops_cmpr = {
|
|||
.read_folio = ntfs_read_folio,
|
||||
.readahead = ntfs_readahead,
|
||||
.dirty_folio = block_dirty_folio,
|
||||
.direct_IO = ntfs_direct_IO,
|
||||
};
|
||||
// clang-format on
|
||||
|
|
Loading…
Reference in New Issue
Block a user