[PATCH 5/37] Re: [2.6-BK-URL] NTFS: 2.1.21 - Big update with race/bugfixes

From: Anton Altaparmakov
Date: Tue Oct 19 2004 - 04:56:04 EST


This is patch 5/37 in the series. It contains the following ChangeSet:

<aia21@xxxxxxxxxx> (04/09/30 1.2004)
NTFS: Forgot to lock the mft bitmap when clearing the bit in
ntfs_extent_mft_record_free().

Signed-off-by: Anton Altaparmakov <aia21@xxxxxxxxxx>

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

===================================================================

diff -Nru a/fs/ntfs/mft.c b/fs/ntfs/mft.c
--- a/fs/ntfs/mft.c 2004-10-19 10:13:23 +01:00
+++ b/fs/ntfs/mft.c 2004-10-19 10:13:23 +01:00
@@ -1210,7 +1210,9 @@
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 -Nru a/fs/ntfs/mft.h b/fs/ntfs/mft.h
--- a/fs/ntfs/mft.h 2004-10-19 10:13:23 +01:00
+++ b/fs/ntfs/mft.h 2004-10-19 10:13:23 +01:00
@@ -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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/