Commit ebc2cc33 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Fix a potential bug in fs/ntfs/mft.c::map_extent_mft_record() that

      could occur in the future for when we start closing/freeing extent
      inodes if we don't set base_ni->ext.extent_ntfs_inos to NULL after
      we free it.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent c3019717
......@@ -418,7 +418,8 @@ MFT_RECORD *map_extent_mft_record(ntfs_inode *base_ni, MFT_REF mref,
m = ERR_PTR(-ENOMEM);
goto unm_err_out;
}
if (base_ni->ext.extent_ntfs_inos) {
if (base_ni->nr_extents) {
BUG_ON(!base_ni->ext.extent_ntfs_inos);
memcpy(tmp, base_ni->ext.extent_ntfs_inos, new_size -
4 * sizeof(ntfs_inode *));
kfree(base_ni->ext.extent_ntfs_inos);
......
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