Commit e33b8d60 authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] FAT: Use synchronous update for {vfat,msdos}_add_entry()

Use the synchronous updates, in order to guarantee that the writing to
a disk is completeing when a system call returns.
Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c1ae98cc
......@@ -278,6 +278,9 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
return err;
dir->i_ctime = dir->i_mtime = *ts;
if (IS_DIRSYNC(dir))
(void)fat_sync_inode(dir);
else
mark_inode_dirty(dir);
return 0;
......
......@@ -684,6 +684,9 @@ static int vfat_add_entry(struct inode *dir, struct qstr *qname, int is_dir,
/* update timestamp */
dir->i_ctime = dir->i_mtime = dir->i_atime = *ts;
if (IS_DIRSYNC(dir))
(void)fat_sync_inode(dir);
else
mark_inode_dirty(dir);
cleanup:
kfree(slots);
......
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