From b5c5a3eb7eb956cc0646d1aee1696fddb30e6b19 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 28 Oct 2015 20:29:18 +0000 Subject: [PATCH] scst_vdisk: procfs build fix git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6560 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index e37f034f9..ade936cab 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -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;