diff options
author | Chris Mason <mason@suse.com> | 2006-09-29 04:59:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:11 -0400 |
commit | 25736b1c692d436508585d1d710912e6f76be2d8 (patch) | |
tree | 8cf9a65b5a6d464ceabfe992b49a028a9a939198 /fs/reiserfs | |
parent | d4328b40af16bae62ff8f854060d33daad237093 (diff) |
[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: Chris Mason <mason@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 1627edd50810..1cfbe857ba27 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -130,7 +130,7 @@ static int reiserfs_sync_file(struct file *p_s_filp, | |||
130 | reiserfs_write_lock(p_s_inode->i_sb); | 130 | reiserfs_write_lock(p_s_inode->i_sb); |
131 | barrier_done = reiserfs_commit_for_inode(p_s_inode); | 131 | barrier_done = reiserfs_commit_for_inode(p_s_inode); |
132 | reiserfs_write_unlock(p_s_inode->i_sb); | 132 | reiserfs_write_unlock(p_s_inode->i_sb); |
133 | if (barrier_done != 1) | 133 | if (barrier_done != 1 && reiserfs_barrier_flush(p_s_inode->i_sb)) |
134 | blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL); | 134 | blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL); |
135 | if (barrier_done < 0) | 135 | if (barrier_done < 0) |
136 | return barrier_done; | 136 | return barrier_done; |