Use the synchronous updates, in order to guarantee that the writing to
a disk is completeing when a system call returns.

Signed-off-by: OGAWA Hirofumi <[EMAIL PROTECTED]>
---

 fs/msdos/namei.c |    5 ++++-
 fs/vfat/namei.c  |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff -puN fs/msdos/namei.c~sync08-fat_tweak7 fs/msdos/namei.c
--- linux-2.6.11/fs/msdos/namei.c~sync08-fat_tweak7     2005-03-06 
02:37:29.000000000 +0900
+++ linux-2.6.11-hirofumi/fs/msdos/namei.c      2005-03-06 02:37:29.000000000 
+0900
@@ -278,7 +278,10 @@ static int msdos_add_entry(struct inode 
                return err;
 
        dir->i_ctime = dir->i_mtime = *ts;
-       mark_inode_dirty(dir);
+       if (IS_DIRSYNC(dir))
+               (void)fat_sync_inode(dir);
+       else
+               mark_inode_dirty(dir);
 
        return 0;
 }
diff -puN fs/vfat/namei.c~sync08-fat_tweak7 fs/vfat/namei.c
--- linux-2.6.11/fs/vfat/namei.c~sync08-fat_tweak7      2005-03-06 
02:37:29.000000000 +0900
+++ linux-2.6.11-hirofumi/fs/vfat/namei.c       2005-03-06 02:37:29.000000000 
+0900
@@ -684,7 +684,10 @@ static int vfat_add_entry(struct inode *
 
        /* update timestamp */
        dir->i_ctime = dir->i_mtime = dir->i_atime = *ts;
-       mark_inode_dirty(dir);
+       if (IS_DIRSYNC(dir))
+               (void)fat_sync_inode(dir);
+       else
+               mark_inode_dirty(dir);
 cleanup:
        kfree(slots);
        return err;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to