Commit 1cd6c962 authored by Konstantin Komarov's avatar Konstantin Komarov

fs/ntfs3: Check 'folio' pointer for NULL

It can be NULL if bmap is called.

Fixes: 82cae269 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent b0a5ddee
......@@ -571,13 +571,18 @@ static noinline int ntfs_get_block_vbo(struct inode *inode, u64 vbo,
clear_buffer_uptodate(bh);
if (is_resident(ni)) {
bh->b_blocknr = RESIDENT_LCN;
bh->b_size = block_size;
if (!folio) {
err = 0;
} else {
ni_lock(ni);
err = attr_data_read_resident(ni, &folio->page);
ni_unlock(ni);
if (!err)
set_buffer_uptodate(bh);
bh->b_size = block_size;
}
return err;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment