#include <linux/hdreg.h>
#include <linux/async.h>
#include <linux/mutex.h>
-#include <linux/smp_lock.h>
#include <asm/ccwdev.h>
#include <asm/ebcdic.h>
if (!block)
return -ENODEV;
- lock_kernel();
base = block->base;
atomic_inc(&block->open_count);
if (test_bit(DASD_FLAG_OFFLINE, &base->flags)) {
goto out;
}
- unlock_kernel();
return 0;
out:
module_put(base->discipline->owner);
unlock:
atomic_dec(&block->open_count);
- unlock_kernel();
return rc;
}
{
struct dasd_block *block = disk->private_data;
- lock_kernel();
atomic_dec(&block->open_count);
module_put(block->base->discipline->owner);
- unlock_kernel();
return 0;
}
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/blkpg.h>
-#include <linux/smp_lock.h>
#include <linux/slab.h>
#include <asm/compat.h>
#include <asm/ccwdev.h>
return ret;
}
-static int
-dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
- unsigned int cmd, unsigned long arg)
+int dasd_ioctl(struct block_device *bdev, fmode_t mode,
+ unsigned int cmd, unsigned long arg)
{
struct dasd_block *block = bdev->bd_disk->private_data;
void __user *argp;
return -EINVAL;
}
}
-
-int dasd_ioctl(struct block_device *bdev, fmode_t mode,
- unsigned int cmd, unsigned long arg)
-{
- int rc;
-
- lock_kernel();
- rc = dasd_do_ioctl(bdev, mode, cmd, arg);
- unlock_kernel();
- return rc;
-}
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/blkdev.h>
-#include <linux/smp_lock.h>
#include <linux/completion.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
struct dcssblk_dev_info *dev_info;
int rc;
- lock_kernel();
dev_info = bdev->bd_disk->private_data;
if (NULL == dev_info) {
rc = -ENODEV;
bdev->bd_block_size = 4096;
rc = 0;
out:
- unlock_kernel();
return rc;
}
struct segment_info *entry;
int rc;
- lock_kernel();
if (!dev_info) {
rc = -ENODEV;
goto out;
up_write(&dcssblk_devices_sem);
rc = 0;
out:
- unlock_kernel();
return rc;
}