diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2004-07-02 12:09:50 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2004-07-02 12:09:50 +0100 |
commit | c4b0642b6f9b55957f9e5f8a8c494dcfd6293826 (patch) | |
tree | 70932b88c29512d2662bf91cedb41ee9fa69c2fb /fs | |
parent | a35e10e07df4753bb6fcacb0ca35c7b60447c6c5 (diff) | |
download | history-c4b0642b6f9b55957f9e5f8a8c494dcfd6293826.tar.gz |
NTFS: Add a set_page_dirty address space operation for ntfs_m[fs]t_aops.
It is simply set to __set_page_dirty_nobuffers() to make sure that
running set_page_dirty() on a page containing mft/ntfs records will
not affect the dirty state of the page buffers.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ntfs/ChangeLog | 4 | ||||
-rw-r--r-- | fs/ntfs/aops.c | 3 | ||||
-rw-r--r-- | fs/ntfs/mft.c | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 8c4c7f0704571c..30aa30ac9bc62e 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -79,6 +79,10 @@ ToDo/Notes: - Load the quota file ($Quota) and check if quota tracking is enabled and if so, mark the quotas out of date. This causes windows to rescan the volume on boot and update all quota entries. + - Add a set_page_dirty address space operation for ntfs_m[fs]t_aops. + It is simply set to __set_page_dirty_nobuffers() to make sure that + running set_page_dirty() on a page containing mft/ntfs records will + not affect the dirty state of the page buffers. 2.1.14 - Fix an NFSd caused deadlock reported by several users. diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index 8023878d6c262f..548403c4dece0b 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c @@ -1841,5 +1841,8 @@ struct address_space_operations ntfs_mst_aops = { disk request queue. */ #ifdef NTFS_RW .writepage = ntfs_writepage, /* Write dirty page to disk. */ + .set_page_dirty = __set_page_dirty_nobuffers, /* Set the page dirty + without touching the buffers + belonging to the page. */ #endif /* NTFS_RW */ }; diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index b817d3be9a7dbd..712f7ad0ac501b 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,7 +744,6 @@ 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, @@ -916,6 +918,7 @@ static int ntfs_mft_writepage(struct page *page, struct writeback_control *wbc) 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); |