mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 13:58:46 +00:00
fs/ntfs3: Check 'folio' pointer for NULL
It can be NULL if bmap is called. Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
parent
b0a5ddee56
commit
1cd6c96219
@ -571,13 +571,18 @@ static noinline int ntfs_get_block_vbo(struct inode *inode, u64 vbo,
|
|||||||
clear_buffer_uptodate(bh);
|
clear_buffer_uptodate(bh);
|
||||||
|
|
||||||
if (is_resident(ni)) {
|
if (is_resident(ni)) {
|
||||||
|
bh->b_blocknr = RESIDENT_LCN;
|
||||||
|
bh->b_size = block_size;
|
||||||
|
if (!folio) {
|
||||||
|
err = 0;
|
||||||
|
} else {
|
||||||
ni_lock(ni);
|
ni_lock(ni);
|
||||||
err = attr_data_read_resident(ni, &folio->page);
|
err = attr_data_read_resident(ni, &folio->page);
|
||||||
ni_unlock(ni);
|
ni_unlock(ni);
|
||||||
|
|
||||||
if (!err)
|
if (!err)
|
||||||
set_buffer_uptodate(bh);
|
set_buffer_uptodate(bh);
|
||||||
bh->b_size = block_size;
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user