]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] reiserfs_fsync should only use barriers when they are enabled
authorChris Mason <mason@suse.com>
Fri, 29 Sep 2006 08:59:54 +0000 (01:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:11 +0000 (09:18 -0700)
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>
fs/reiserfs/file.c

index 1627edd50810b94df2f4003479092022c9952d9d..1cfbe857ba27216c03243c6eea5b07ab9d72b1f4 100644 (file)
@@ -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;