History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs

Here are some trivial NTFS changes (a spelling fix and two use before NULL check cases found by Coverity as well as an update in MAINTAINERS for the path to the ntfs git repo) together with a simple LDM fix for parsing fragmented VBLKs. * git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs: NTFS: Update git repo path in MAINTAINERS file. LDM: Fix reassembly of extended VBLKs. NTFS: Correct two spelling errors "dealocate" to "deallocate" in mft.c. NTFS: Do not dereference pointer before checking for NULL. NTFS: Remove unused variable.

Linus Torvalds committed 14 years ago

Commit 5ffca282 parents e25bda5 e6f4dee5 files · +12 −17Browse files

Unified · Split

5 files
  1. MAINTAINERS +1 −1
  2. block/partitions/ldm.c +4 −7
  3. fs/ntfs/attrib.c +3 −3
  4. fs/ntfs/mft.c +3 −3
  5. fs/ntfs/super.c +1 −3
MAINTAINERS+1−1
@@ -4685,7 +4685,7 @@ NTFS FILESYSTEM · 4684 unmodified lines
46854685 M: Anton Altaparmakov <anton@tuxera.com>
46864686 L: linux-ntfs-dev@lists.sourceforge.net
46874687 W: http://www.tuxera.com/
4688−T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
4688+T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git
46894689 S: Supported
46904690 F: Documentation/filesystems/ntfs.txt
46914691 F: fs/ntfs/
block/partitions/ldm.c+4−7
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * ldm - Support for Windows Logical Disk Manager (Dynamic Disks)
33 *
44 * Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org>
5− * Copyright (c) 2001-2007 Anton Altaparmakov
5+ * Copyright (c) 2001-2012 Anton Altaparmakov
66 * Copyright (C) 2001,2002 Jakob Kemi <jakob.kemi@telia.com>
77 *
88 * Documentation is available at http://www.linux-ntfs.org/doku.php?id=downloads
@@ -1341,20 +1341,17 @@ found: · 1332 unmodified lines
13411341 ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num);
13421342 return false;
13431343 }
1344−
13451344 if (f->map & (1 << rec)) {
13461345 ldm_error ("Duplicate VBLK, part %d.", rec);
13471346 f->map &= 0x7F; /* Mark the group as broken */
13481347 return false;
13491348 }
1350−
13511349 f->map |= (1 << rec);
1352−
1350+ if (!rec)
1351+ memcpy(f->data, data, VBLK_SIZE_HEAD);
13531352 data += VBLK_SIZE_HEAD;
13541353 size -= VBLK_SIZE_HEAD;
1355−
1356− memcpy (f->data+rec*(size-VBLK_SIZE_HEAD)+VBLK_SIZE_HEAD, data, size);
1357−
1354+ memcpy(f->data + VBLK_SIZE_HEAD + rec * size, data, size);
13581355 return true;
13591356 }
13601357
fs/ntfs/attrib.c+3−3
@@ -1,7 +1,7 @@
11 /**
22 * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project.
33 *
4− * Copyright (c) 2001-2007 Anton Altaparmakov
4+ * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
55 * Copyright (c) 2002 Richard Russon
66 *
77 * This program/include file is free software; you can redistribute it and/or
@@ -345,10 +345,10 @@ LCN ntfs_attr_vcn_to_lcn_nolock(ntfs_inode *ni, const VCN vcn, · 337 unmodified lines
345345 unsigned long flags;
346346 bool is_retry = false;
347347
348+ BUG_ON(!ni);
348349 ntfs_debug("Entering for i_ino 0x%lx, vcn 0x%llx, %s_locked.",
349350 ni->mft_no, (unsigned long long)vcn,
350351 write_locked ? "write" : "read");
351− BUG_ON(!ni);
352352 BUG_ON(!NInoNonResident(ni));
353353 BUG_ON(vcn < 0);
354354 if (!ni->runlist.rl) {
@@ -469,9 +469,9 @@ runlist_element *ntfs_attr_find_vcn_nolock(ntfs_inode *ni, const VCN vcn, · 114 unmodified lines
469469 int err = 0;
470470 bool is_retry = false;
471471
472+ BUG_ON(!ni);
472473 ntfs_debug("Entering for i_ino 0x%lx, vcn 0x%llx, with%s ctx.",
473474 ni->mft_no, (unsigned long long)vcn, ctx ? "" : "out");
474− BUG_ON(!ni);
475475 BUG_ON(!NInoNonResident(ni));
476476 BUG_ON(vcn < 0);
477477 if (!ni->runlist.rl) {
fs/ntfs/mft.c+3−3
@@ -1,7 +1,7 @@
11 /**
22 * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project.
33 *
4− * Copyright (c) 2001-2011 Anton Altaparmakov and Tuxera Inc.
4+ * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
55 * Copyright (c) 2002 Richard Russon
66 *
77 * This program/include file is free software; you can redistribute it and/or
@@ -1367,7 +1367,7 @@ static int ntfs_mft_bitmap_extend_allocation_nolock(ntfs_volume *vol) · 1359 unmodified lines
13671367 ntfs_error(vol->sb, "Failed to merge runlists for mft "
13681368 "bitmap.");
13691369 if (ntfs_cluster_free_from_rl(vol, rl2)) {
1370− ntfs_error(vol->sb, "Failed to dealocate "
1370+ ntfs_error(vol->sb, "Failed to deallocate "
13711371 "allocated cluster.%s", es);
13721372 NVolSetErrors(vol);
13731373 }
@@ -1805,7 +1805,7 @@ static int ntfs_mft_data_extend_allocation_nolock(ntfs_volume *vol) · 431 unmodified lines
18051805 ntfs_error(vol->sb, "Failed to merge runlists for mft data "
18061806 "attribute.");
18071807 if (ntfs_cluster_free_from_rl(vol, rl2)) {
1808− ntfs_error(vol->sb, "Failed to dealocate clusters "
1808+ ntfs_error(vol->sb, "Failed to deallocate clusters "
18091809 "from the mft data attribute.%s", es);
18101810 NVolSetErrors(vol);
18111811 }
fs/ntfs/super.c+1−3
@@ -1,7 +1,7 @@
11 /*
22 * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project.
33 *
4− * Copyright (c) 2001-2011 Anton Altaparmakov and Tuxera Inc.
4+ * Copyright (c) 2001-2012 Anton Altaparmakov and Tuxera Inc.
55 * Copyright (c) 2001,2002 Richard Russon
66 *
77 * This program/include file is free software; you can redistribute it and/or
@@ -1239,7 +1239,6 @@ static int check_windows_hibernation_status(ntfs_volume *vol) · 1231 unmodified lines
12391239 {
12401240 MFT_REF mref;
12411241 struct inode *vi;
1242− ntfs_inode *ni;
12431242 struct page *page;
12441243 u32 *kaddr, *kend;
12451244 ntfs_name *name = NULL;
@@ -1290,7 +1289,6 @@ static int check_windows_hibernation_status(ntfs_volume *vol) · 44 unmodified lines
12901289 "is not the system volume.", i_size_read(vi));
12911290 goto iput_out;
12921291 }
1293− ni = NTFS_I(vi);
12941292 page = ntfs_map_page(vi->i_mapping, 0);
12951293 if (IS_ERR(page)) {
12961294 ntfs_error(vol->sb, "Failed to read from hiberfil.sys.");