mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 21:51:27 +00:00
scst_vdisk: procfs build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6560 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -7356,26 +7356,6 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
static ssize_t vdisk_sysfs_sync_store(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct scst_device *dev =
|
||||
container_of(kobj, struct scst_device, dev_kobj);
|
||||
struct scst_vdisk_dev *virt_dev = dev->dh_priv;
|
||||
int res;
|
||||
|
||||
if (virt_dev->nullio)
|
||||
res = 0;
|
||||
else if (virt_dev->blockio)
|
||||
res = vdisk_blockio_flush(virt_dev->bdev, GFP_KERNEL, false,
|
||||
NULL, false);
|
||||
else
|
||||
res = __vdisk_fsync_fileio(0, i_size_read(file_inode(virt_dev->fd)),
|
||||
dev, NULL, virt_dev->fd);
|
||||
|
||||
return res ? : count;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
|
||||
static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev)
|
||||
{
|
||||
@@ -8283,6 +8263,26 @@ out_e_unlock:
|
||||
|
||||
#ifndef CONFIG_SCST_PROC
|
||||
|
||||
static ssize_t vdisk_sysfs_sync_store(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct scst_device *dev =
|
||||
container_of(kobj, struct scst_device, dev_kobj);
|
||||
struct scst_vdisk_dev *virt_dev = dev->dh_priv;
|
||||
int res;
|
||||
|
||||
if (virt_dev->nullio)
|
||||
res = 0;
|
||||
else if (virt_dev->blockio)
|
||||
res = vdisk_blockio_flush(virt_dev->bdev, GFP_KERNEL, false,
|
||||
NULL, false);
|
||||
else
|
||||
res = __vdisk_fsync_fileio(0, i_size_read(file_inode(virt_dev->fd)),
|
||||
dev, NULL, virt_dev->fd);
|
||||
|
||||
return res ? : count;
|
||||
}
|
||||
|
||||
static int vcdrom_sysfs_process_filename_store(struct scst_sysfs_work_item *work)
|
||||
{
|
||||
int res;
|
||||
|
||||
Reference in New Issue
Block a user