]> git.hungrycats.org Git - linux/commitdiff
NTFS: Forgot to lock the mft bitmap when clearing the bit in
authorAnton Altaparmakov <aia21@cantab.net>
Thu, 30 Sep 2004 11:08:20 +0000 (12:08 +0100)
committerAnton Altaparmakov <aia21@cantab.net>
Thu, 30 Sep 2004 11:08:20 +0000 (12:08 +0100)
      ntfs_extent_mft_record_free().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
fs/ntfs/mft.c
fs/ntfs/mft.h

index ba57d2448eecc28dfc0c4bda41ef37a5479a3750..4b9be65ca33d01f4943ec47418d12b0bd656f815 100644 (file)
@@ -1210,7 +1210,9 @@ rollback_error:
        ntfs_clear_extent_inode(ni);
 
        /* Clear the bit in the $MFT/$BITMAP corresponding to this record. */
+       down_write(&vol->mftbmp_lock);
        err = ntfs_bitmap_clear_bit(vol->mftbmp_ino, mft_no);
+       up_write(&vol->mftbmp_lock);
        if (unlikely(err)) {
                /*
                 * The extent inode is gone but we failed to deallocate it in
index 95f41e8cd3775a9d433b5d8ed2ce6444f073cced..5f3566779fa8ea634b31682182f744b9d087e9d1 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "inode.h"
 
-extern int format_mft_record(ntfs_inode *ni, MFT_RECORD *m);
-
 extern MFT_RECORD *map_mft_record(ntfs_inode *ni);
 extern void unmap_mft_record(ntfs_inode *ni);