From 8bb735216a0675e247bbe8b8b92c09d6884d1a17 Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Thu, 8 Sep 2005 16:48:28 +0100 Subject: NTFS: Remove two bogus BUG_ON()s from fs/ntfs/mft.c. Signed-off-by: Anton Altaparmakov --- fs/ntfs/mft.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs/ntfs/mft.c') diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 317f7c679fd3..e27651db4534 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -511,7 +511,6 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, } while (bh); tail->b_this_page = head; attach_page_buffers(page, head); - BUG_ON(!page_has_buffers(page)); } bh = head = page_buffers(page); BUG_ON(!bh); @@ -692,7 +691,6 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync) */ if (!NInoTestClearDirty(ni)) goto done; - BUG_ON(!page_has_buffers(page)); bh = head = page_buffers(page); BUG_ON(!bh); rl = NULL; -- cgit v1.2.2 From bbf1813fb8ff9d21171bf22e6d1f0e0393601e86 Mon Sep 17 00:00:00 2001 From: Anton Altaparmakov Date: Thu, 8 Sep 2005 21:09:06 +0100 Subject: NTFS: Fix cluster (de)allocators to work when the runlist is NULL and more importantly to take a locked runlist rather than them locking it which leads to lock reversal. Signed-off-by: Anton Altaparmakov --- fs/ntfs/mft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ntfs/mft.c') diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index e27651db4534..2c32b84385a8 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -1953,7 +1953,7 @@ restore_undo_alloc: a = ctx->attr; a->data.non_resident.highest_vcn = cpu_to_sle64(old_last_vcn - 1); undo_alloc: - if (ntfs_cluster_free(vol->mft_ino, old_last_vcn, -1) < 0) { + if (ntfs_cluster_free(vol->mft_ino, old_last_vcn, -1, TRUE) < 0) { ntfs_error(vol->sb, "Failed to free clusters from mft data " "attribute.%s", es); NVolSetErrors(vol); -- cgit v1.2.2