aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/ioctl.c')
-rw-r--r--fs/nilfs2/ioctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 2a70fce70c6..06658caa18b 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -692,8 +692,14 @@ static int nilfs_ioctl_sync(struct inode *inode, struct file *filp,
692 if (ret < 0) 692 if (ret < 0)
693 return ret; 693 return ret;
694 694
695 nilfs = inode->i_sb->s_fs_info;
696 if (nilfs_test_opt(nilfs, BARRIER)) {
697 ret = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
698 if (ret == -EIO)
699 return ret;
700 }
701
695 if (argp != NULL) { 702 if (argp != NULL) {
696 nilfs = inode->i_sb->s_fs_info;
697 down_read(&nilfs->ns_segctor_sem); 703 down_read(&nilfs->ns_segctor_sem);
698 cno = nilfs->ns_cno - 1; 704 cno = nilfs->ns_cno - 1;
699 up_read(&nilfs->ns_segctor_sem); 705 up_read(&nilfs->ns_segctor_sem);