The following code, starting at line 2591 in the file fs/ntfs/mft.c does
not look right:
m = map_extent_mft_record(base_ni, bit, &ni);
if (IS_ERR(m)) {
ntfs_error(vol->sb, "Failed to map allocated extent "
"mft record 0x%llx.", (long long)bit);
err = PTR_ERR(m);
/* Set the mft record itself not in use. */
m->flags &= cpu_to_le16(
~le16_to_cpu(MFT_RECORD_IN_USE));
If m satisfies IS_ERR(m) it does not seem correct to dereference it.
Other error handling code in the same function also sets m->flags, but not
for the same value of m. In this case m has been redefined. Perhaps the
solution is to save the previous value of m in a temporary variable so
that the flags field can be updated here.
julia
|