Commit b994d39a authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Fix another stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find()

      where we forgot to unmap the extent mft record when we had finished
      enumerating an attribute which caused a bug check to trigger when the
      VFS calls ->clear_inode.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent 2f3ce491
...@@ -278,7 +278,7 @@ ChangeLog ...@@ -278,7 +278,7 @@ ChangeLog
Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
2.1.20: 2.1.20:
- Fix a stupid bug introduced in 2.1.18 release. - Fix two stupid bugs introduced in 2.1.18 release.
2.1.19: 2.1.19:
- Minor bugfix in handling of the default upcase table. - Minor bugfix in handling of the default upcase table.
- Many internal cleanups and improvements. Many thanks to Linus - Many internal cleanups and improvements. Many thanks to Linus
......
...@@ -27,6 +27,10 @@ ToDo/Notes: ...@@ -27,6 +27,10 @@ ToDo/Notes:
where we did not clear ctx->al_entry but it was still set due to where we did not clear ctx->al_entry but it was still set due to
changes in ntfs_attr_lookup() and ntfs_external_attr_find() in changes in ntfs_attr_lookup() and ntfs_external_attr_find() in
particular. particular.
- Fix another stupid bug in fs/ntfs/attrib.c::ntfs_external_attr_find()
where we forgot to unmap the extent mft record when we had finished
enumerating an attribute which caused a bug check to trigger when the
VFS calls ->clear_inode.
2.1.19 - Many cleanups, improvements, and a minor bug fix. 2.1.19 - Many cleanups, improvements, and a minor bug fix.
......
...@@ -1738,11 +1738,13 @@ static int ntfs_external_attr_find(const ATTR_TYPE type, ...@@ -1738,11 +1738,13 @@ static int ntfs_external_attr_find(const ATTR_TYPE type,
* correctly yet as we do not know what @ctx->attr will be set to by * correctly yet as we do not know what @ctx->attr will be set to by
* the call to ntfs_attr_find() below. * the call to ntfs_attr_find() below.
*/ */
if (ni != base_ni)
unmap_extent_mft_record(ni);
ctx->mrec = ctx->base_mrec; ctx->mrec = ctx->base_mrec;
ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec + ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
le16_to_cpu(ctx->mrec->attrs_offset)); le16_to_cpu(ctx->mrec->attrs_offset));
ctx->is_first = TRUE; ctx->is_first = TRUE;
ctx->ntfs_ino = ctx->base_ntfs_ino; ctx->ntfs_ino = base_ni;
ctx->base_ntfs_ino = NULL; ctx->base_ntfs_ino = NULL;
ctx->base_mrec = NULL; ctx->base_mrec = NULL;
ctx->base_attr = NULL; ctx->base_attr = NULL;
......
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