From 9009565ef4fe7ac83f58ff9938852ecc31691cf5 Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Thu, 30 Sep 2004 12:08:20 +0100 Subject: [PATCH] NTFS: Forgot to lock the mft bitmap when clearing the bit in ntfs_extent_mft_record_free(). Signed-off-by: Anton Altaparmakov --- fs/ntfs/mft.c | 2 ++ fs/ntfs/mft.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index ba57d2448eecc..4b9be65ca33d0 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -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 diff --git a/fs/ntfs/mft.h b/fs/ntfs/mft.h index 95f41e8cd3775..5f3566779fa8e 100644 --- a/fs/ntfs/mft.h +++ b/fs/ntfs/mft.h @@ -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); -- 2.53.0