Commit 58f3fa97 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] dirsync support for minixfs, sysvfs and ufs

Makes minixfs, sysvfs and ufs understand `mount -o dirsync'.
parent 53b478c6
......@@ -49,7 +49,7 @@ static int dir_commit_chunk(struct page *page, unsigned from, unsigned to)
struct inode *dir = (struct inode *)page->mapping->host;
int err = 0;
page->mapping->a_ops->commit_write(NULL, page, from, to);
if (IS_SYNC(dir))
if (IS_DIRSYNC(dir))
err = write_one_page(page, 1);
else
unlock_page(page);
......
......@@ -42,7 +42,7 @@ static int dir_commit_chunk(struct page *page, unsigned from, unsigned to)
int err = 0;
page->mapping->a_ops->commit_write(NULL, page, from, to);
if (IS_SYNC(dir))
if (IS_DIRSYNC(dir))
err = write_one_page(page, 1);
else
unlock_page(page);
......
......@@ -356,7 +356,7 @@ void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
dir->i_version = ++event;
de->d_ino = cpu_to_fs32(dir->i_sb, inode->i_ino);
mark_buffer_dirty(bh);
if (IS_SYNC(dir)) {
if (IS_DIRSYNC(dir)) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer(bh);
}
......@@ -457,7 +457,7 @@ int ufs_add_link(struct dentry *dentry, struct inode *inode)
de->d_ino = cpu_to_fs32(sb, inode->i_ino);
ufs_set_de_type(sb, de, inode->i_mode);
mark_buffer_dirty(bh);
if (IS_SYNC(dir)) {
if (IS_DIRSYNC(dir)) {
ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh);
}
......@@ -508,7 +508,7 @@ int ufs_delete_entry (struct inode * inode, struct ufs_dir_entry * dir,
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
mark_inode_dirty(inode);
mark_buffer_dirty(bh);
if (IS_SYNC(inode)) {
if (IS_DIRSYNC(inode)) {
ll_rw_block(WRITE, 1, &bh);
wait_on_buffer(bh);
}
......
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