Commit 5c1c88cd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 1f268d6d aa4b92c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2491,7 +2491,7 @@ s64 ntfs_attr_extend_allocation(ntfs_inode *ni, s64 new_alloc_size,
 * 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.
+1 −1
Original line number Diff line number Diff line
@@ -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. */
+19 −17
Original line number Diff line number Diff line
@@ -1955,12 +1955,14 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol)
				"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 (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),
@@ -1983,8 +1985,8 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol)
				"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);
+2 −2
Original line number Diff line number Diff line
@@ -1620,7 +1620,7 @@ static bool load_and_init_attrdef(ntfs_volume *vol)
		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 @@ static bool load_and_init_upcase(ntfs_volume *vol)
		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)