On Sat, 13 Sep 2014 15:55:56 +0200, Andreas Rohner wrote:
> diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
> index 422fb54..5a530f3 100644
> --- a/fs/nilfs2/ioctl.c
> +++ b/fs/nilfs2/ioctl.c
> @@ -1022,11 +1022,9 @@ static int nilfs_ioctl_sync(struct inode *inode, 
> struct file *filp,
>               return ret;
>  
>       nilfs = inode->i_sb->s_fs_info;
> -     if (nilfs_test_opt(nilfs, BARRIER)) {
> -             ret = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
> -             if (ret == -EIO)
> -                     return ret;
> -     }
> +     ret = nilfs_flush_device(nilfs);

> +     if (ret == -EIO)
> +             return ret;

One more comment.  I think this special treatment of EIO should be
encapsulated in nilfs_flush_device().  nilfs_ioctl_sync() doesn't have
to know it:

        if (ret < 0)
                return ret;

Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to