浏览代码

NTFS: Add a missing call to flush_dcache_mft_record_page() in
fs/ntfs/inode.c::ntfs_write_inode().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Anton Altaparmakov 19 年之前
父节点
当前提交
20fdcf1d54
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 2 0
      fs/ntfs/ChangeLog
  2. 6 3
      fs/ntfs/inode.c

+ 2 - 0
fs/ntfs/ChangeLog

@@ -41,6 +41,8 @@ ToDo/Notes:
 	- Fix a bug in fs/ntfs/inode.c::ntfs_read_locked_index_inode() where we
 	- Fix a bug in fs/ntfs/inode.c::ntfs_read_locked_index_inode() where we
 	  forgot to update a temporary variable so loading index inodes which
 	  forgot to update a temporary variable so loading index inodes which
 	  have an index allocation attribute failed.
 	  have an index allocation attribute failed.
+	- Add a missing call to flush_dcache_mft_record_page() in
+	  fs/ntfs/inode.c::ntfs_write_inode().
 
 
 2.1.26 - Minor bug fixes and updates.
 2.1.26 - Minor bug fixes and updates.
 
 

+ 6 - 3
fs/ntfs/inode.c

@@ -3064,9 +3064,12 @@ int ntfs_write_inode(struct inode *vi, int sync)
 	 * record will be cleaned and written out to disk below, i.e. before
 	 * record will be cleaned and written out to disk below, i.e. before
 	 * this function returns.
 	 * this function returns.
 	 */
 	 */
-	if (modified && !NInoTestSetDirty(ctx->ntfs_ino))
-		mark_ntfs_record_dirty(ctx->ntfs_ino->page,
-				ctx->ntfs_ino->page_ofs);
+	if (modified) {
+		flush_dcache_mft_record_page(ctx->ntfs_ino);
+		if (!NInoTestSetDirty(ctx->ntfs_ino)) {
+			mark_ntfs_record_dirty(ctx->ntfs_ino->page,
+					ctx->ntfs_ino->page_ofs);
+	}
 	ntfs_attr_put_search_ctx(ctx);
 	ntfs_attr_put_search_ctx(ctx);
 	/* Now the access times are updated, write the base mft record. */
 	/* Now the access times are updated, write the base mft record. */
 	if (NInoDirty(ni))
 	if (NInoDirty(ni))