Commit c4b0642b authored by Anton Altaparmakov's avatar Anton Altaparmakov

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: default avatarAnton Altaparmakov <aia21@cantab.net>
parent a35e10e0
...@@ -79,6 +79,10 @@ ToDo/Notes: ...@@ -79,6 +79,10 @@ ToDo/Notes:
- Load the quota file ($Quota) and check if quota tracking is enabled - 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 and if so, mark the quotas out of date. This causes windows to
rescan the volume on boot and update all quota entries. 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. 2.1.14 - Fix an NFSd caused deadlock reported by several users.
......
...@@ -1841,5 +1841,8 @@ struct address_space_operations ntfs_mst_aops = { ...@@ -1841,5 +1841,8 @@ struct address_space_operations ntfs_mst_aops = {
disk request queue. */ disk request queue. */
#ifdef NTFS_RW #ifdef NTFS_RW
.writepage = ntfs_writepage, /* Write dirty page to disk. */ .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 */ #endif /* NTFS_RW */
}; };
...@@ -122,6 +122,9 @@ struct address_space_operations ntfs_mft_aops = { ...@@ -122,6 +122,9 @@ struct address_space_operations ntfs_mft_aops = {
#ifdef NTFS_RW #ifdef NTFS_RW
.writepage = ntfs_mft_writepage, /* Write out the dirty mft .writepage = ntfs_mft_writepage, /* Write out the dirty mft
records in a page. */ 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 */ #endif /* NTFS_RW */
}; };
...@@ -741,7 +744,6 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync) ...@@ -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); ntfs_debug("Entering for inode 0x%lx.", ni->mft_no);
BUG_ON(NInoAttr(ni)); BUG_ON(NInoAttr(ni));
BUG_ON(!max_bhs); BUG_ON(!max_bhs);
BUG_ON(!page);
BUG_ON(!PageLocked(page)); BUG_ON(!PageLocked(page));
/* /*
* If the ntfs_inode is clean no need to do anything. If it is dirty, * 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) ...@@ -916,6 +918,7 @@ static int ntfs_mft_writepage(struct page *page, struct writeback_control *wbc)
BOOL is_dirty = FALSE; BOOL is_dirty = FALSE;
BUG_ON(!PageLocked(page)); BUG_ON(!PageLocked(page));
BUG_ON(PageWriteback(page));
BUG_ON(mft_vi != vol->mft_ino); BUG_ON(mft_vi != vol->mft_ino);
/* The first mft record number in the page. */ /* The first mft record number in the page. */
mft_no = page->index << (PAGE_CACHE_SHIFT - vol->mft_record_size_bits); mft_no = page->index << (PAGE_CACHE_SHIFT - vol->mft_record_size_bits);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment