提交 25736b1c 编写于 作者: C Chris Mason 提交者: Linus Torvalds

[PATCH] reiserfs_fsync should only use barriers when they are enabled

make sure that reiserfs_fsync only triggers barriers when mounted with -o
barrier=flush
Signed-off-by: NChris Mason <mason@suse.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 d4328b40
......@@ -130,7 +130,7 @@ static int reiserfs_sync_file(struct file *p_s_filp,
reiserfs_write_lock(p_s_inode->i_sb);
barrier_done = reiserfs_commit_for_inode(p_s_inode);
reiserfs_write_unlock(p_s_inode->i_sb);
if (barrier_done != 1)
if (barrier_done != 1 && reiserfs_barrier_flush(p_s_inode->i_sb))
blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL);
if (barrier_done < 0)
return barrier_done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册