X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fntfs%2Fmft.c;h=712f7ad0ac501b26231f04413d5ebffe39241a4a;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=8875af935f54f5d6b2ff516abe1d5565e3b67a0d;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 8875af935..712f7ad0a 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -122,6 +122,9 @@ struct address_space_operations ntfs_mft_aops = { #ifdef NTFS_RW .writepage = ntfs_mft_writepage, /* Write out the dirty mft records in a page. */ + .set_page_dirty = __set_page_dirty_nobuffers, /* Set the page dirty + without touching the buffers + belonging to the page. */ #endif /* NTFS_RW */ }; @@ -741,13 +744,12 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync) ntfs_debug("Entering for inode 0x%lx.", ni->mft_no); BUG_ON(NInoAttr(ni)); BUG_ON(!max_bhs); - BUG_ON(!page); BUG_ON(!PageLocked(page)); /* * If the ntfs_inode is clean no need to do anything. If it is dirty, * mark it as clean now so that it can be redirtied later on if needed. - * There is no danger of races as as long as the caller is holding the - * locks for the mft record @m and the page it is in. + * There is no danger of races since the caller is holding the locks + * for the mft record @m and the page it is in. */ if (!NInoTestClearDirty(ni)) goto done; @@ -915,6 +917,8 @@ static int ntfs_mft_writepage(struct page *page, struct writeback_control *wbc) int nr, i, j; BOOL is_dirty = FALSE; + BUG_ON(!PageLocked(page)); + BUG_ON(PageWriteback(page)); BUG_ON(mft_vi != vol->mft_ino); /* The first mft record number in the page. */ mft_no = page->index << (PAGE_CACHE_SHIFT - vol->mft_record_size_bits);