mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
v6.5/fs.ntfs
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZJU4DAAKCRCRxhvAZXjc oi8dAP9Rxv13trPMEFB1aJ3YHIMYRKSlG81vNJo+5ur43RFc4gD+NJBBYSb7bMYu V8uIKnyFfMtLtHZA9M00Xqipq/sLDA4= =C0YR -----END PGP SIGNATURE----- Merge tag 'v6.5/fs.ntfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull ntfs updates from Christian Brauner: "A pile of various smaller fixes for ntfs" * tag 'v6.5/fs.ntfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: ntfs: do not dereference a null ctx on error ntfs: Remove unneeded semicolon ntfs: Correct spelling ntfs: remove redundant initialization to pointer cb_sb_start
This commit is contained in:
commit
5c1c88cddb
@ -2491,7 +2491,7 @@ conv_err_out:
|
||||
* byte offset @ofs inside the attribute with the constant byte @val.
|
||||
*
|
||||
* This function is effectively like memset() applied to an ntfs attribute.
|
||||
* Note thie function actually only operates on the page cache pages belonging
|
||||
* Note this function actually only operates on the page cache pages belonging
|
||||
* to the ntfs attribute and it marks them dirty after doing the memset().
|
||||
* Thus it relies on the vm dirty page write code paths to cause the modified
|
||||
* pages to be written to the mft record/disk.
|
||||
|
@ -161,7 +161,7 @@ static int ntfs_decompress(struct page *dest_pages[], int completed_pages[],
|
||||
*/
|
||||
u8 *cb_end = cb_start + cb_size; /* End of cb. */
|
||||
u8 *cb = cb_start; /* Current position in cb. */
|
||||
u8 *cb_sb_start = cb; /* Beginning of the current sb in the cb. */
|
||||
u8 *cb_sb_start; /* Beginning of the current sb in the cb. */
|
||||
u8 *cb_sb_end; /* End of current sb / beginning of next sb. */
|
||||
|
||||
/* Variables for uncompressed data / destination. */
|
||||
|
@ -1955,36 +1955,38 @@ undo_alloc:
|
||||
"attribute.%s", es);
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
a = ctx->attr;
|
||||
|
||||
if (ntfs_rl_truncate_nolock(vol, &mft_ni->runlist, old_last_vcn)) {
|
||||
ntfs_error(vol->sb, "Failed to truncate mft data attribute "
|
||||
"runlist.%s", es);
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
if (mp_rebuilt && !IS_ERR(ctx->mrec)) {
|
||||
if (ntfs_mapping_pairs_build(vol, (u8*)a + le16_to_cpu(
|
||||
if (ctx) {
|
||||
a = ctx->attr;
|
||||
if (mp_rebuilt && !IS_ERR(ctx->mrec)) {
|
||||
if (ntfs_mapping_pairs_build(vol, (u8 *)a + le16_to_cpu(
|
||||
a->data.non_resident.mapping_pairs_offset),
|
||||
old_alen - le16_to_cpu(
|
||||
a->data.non_resident.mapping_pairs_offset),
|
||||
a->data.non_resident.mapping_pairs_offset),
|
||||
rl2, ll, -1, NULL)) {
|
||||
ntfs_error(vol->sb, "Failed to restore mapping pairs "
|
||||
ntfs_error(vol->sb, "Failed to restore mapping pairs "
|
||||
"array.%s", es);
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
if (ntfs_attr_record_resize(ctx->mrec, a, old_alen)) {
|
||||
ntfs_error(vol->sb, "Failed to restore attribute "
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
if (ntfs_attr_record_resize(ctx->mrec, a, old_alen)) {
|
||||
ntfs_error(vol->sb, "Failed to restore attribute "
|
||||
"record.%s", es);
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
flush_dcache_mft_record_page(ctx->ntfs_ino);
|
||||
mark_mft_record_dirty(ctx->ntfs_ino);
|
||||
} else if (IS_ERR(ctx->mrec)) {
|
||||
ntfs_error(vol->sb, "Failed to restore attribute search "
|
||||
"context.%s", es);
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
flush_dcache_mft_record_page(ctx->ntfs_ino);
|
||||
mark_mft_record_dirty(ctx->ntfs_ino);
|
||||
} else if (IS_ERR(ctx->mrec)) {
|
||||
ntfs_error(vol->sb, "Failed to restore attribute search "
|
||||
"context.%s", es);
|
||||
NVolSetErrors(vol);
|
||||
}
|
||||
if (ctx)
|
||||
ntfs_attr_put_search_ctx(ctx);
|
||||
}
|
||||
if (!IS_ERR(mrec))
|
||||
unmap_mft_record(mft_ni);
|
||||
up_write(&mft_ni->runlist.lock);
|
||||
|
@ -1620,7 +1620,7 @@ read_partial_attrdef_page:
|
||||
memcpy((u8*)vol->attrdef + (index++ << PAGE_SHIFT),
|
||||
page_address(page), size);
|
||||
ntfs_unmap_page(page);
|
||||
};
|
||||
}
|
||||
if (size == PAGE_SIZE) {
|
||||
size = i_size & ~PAGE_MASK;
|
||||
if (size)
|
||||
@ -1689,7 +1689,7 @@ read_partial_upcase_page:
|
||||
memcpy((char*)vol->upcase + (index++ << PAGE_SHIFT),
|
||||
page_address(page), size);
|
||||
ntfs_unmap_page(page);
|
||||
};
|
||||
}
|
||||
if (size == PAGE_SIZE) {
|
||||
size = i_size & ~PAGE_MASK;
|
||||
if (size)
|
||||
|
Loading…
Reference in New Issue
Block a user