> +     if (flush == true) {
> +             err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL,
> +                                      NULL);
> +             if (ret == 0)
> +                     ret = err;
> +     }
> +
>  out:
>       mutex_unlock(&inode->i_mutex);

There is no need to have the cache flush under i_mutex, and thus there's
also no need to have the parameter, as the flush can be done in
generic_file_fsync.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to