Commit faed8cc6 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Update fs/ntfs/inode.c::ntfs_write_inode() to also use the helper

      mark_ntfs_record_dirty() and thus to set the buffers belonging to the
      mft record dirty as well as the page itself.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent 7719f5a1
......@@ -65,6 +65,9 @@ ToDo/Notes:
page itself.
- Update fs/ntfs/mft.c::write_mft_record_nolock() and sync_mft_mirror()
to cope with the fact that there now are dirty buffers in mft pages.
- Update fs/ntfs/inode.c::ntfs_write_inode() to also use the helper
mark_ntfs_record_dirty() and thus to set the buffers belonging to the
mft record dirty as well as the page itself.
2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
......
......@@ -2271,7 +2271,7 @@ int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt)
* ntfs_truncate - called when the i_size of an ntfs inode is changed
* @vi: inode for which the i_size was changed
*
* We don't support i_size changes yet.
* We do not support i_size changes yet.
*
* The kernel guarantees that @vi is a regular file (S_ISREG() is true) and
* that the change is allowed.
......@@ -2505,9 +2505,16 @@ int ntfs_write_inode(struct inode *vi, int sync)
* dirty, since we are going to write this mft record below in any case
* and the base mft record may actually not have been modified so it
* might not need to be written out.
* NOTE: It is not a problem when the inode for $MFT itself is being
* written out as mark_ntfs_record_dirty() will only set I_DIRTY_PAGES
* on the $MFT inode and hence ntfs_write_inode() will not be
* re-invoked because of it which in turn is ok since the dirtied mft
* record will be cleaned and written out to disk below, i.e. before
* this function returns.
*/
if (modified && !NInoTestSetDirty(ctx->ntfs_ino))
__set_page_dirty_nobuffers(ctx->ntfs_ino->page);
mark_ntfs_record_dirty(ctx->ntfs_ino, ctx->ntfs_ino->page,
ctx->ntfs_ino->page_ofs);
ntfs_attr_put_search_ctx(ctx);
/* Now the access times are updated, write the base mft record. */
if (NInoDirty(ni))
......
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