summaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoeblk.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 15:23:18 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 13:47:40 +0200
commit94562c175113cf91204a77269eabeea32e1f38db (patch)
treea94624caae43a5ad5d6b0a9d5afa117b4b04e553 /drivers/block/aoe/aoeblk.c
parent[PATCH] switch amiflop (diff)
downloadlinux-94562c175113cf91204a77269eabeea32e1f38db.tar.xz
linux-94562c175113cf91204a77269eabeea32e1f38db.zip
[PATCH] switch aoeblk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block/aoe/aoeblk.c')
-rw-r--r--drivers/block/aoe/aoeblk.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index d4d9796d5ddd..1747dd272cd4 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -118,13 +118,11 @@ aoedisk_rm_sysfs(struct aoedev *d)
}
static int
-aoeblk_open(struct inode *inode, struct file *filp)
+aoeblk_open(struct block_device *bdev, fmode_t mode)
{
- struct aoedev *d;
+ struct aoedev *d = bdev->bd_disk->private_data;
ulong flags;
- d = inode->i_bdev->bd_disk->private_data;
-
spin_lock_irqsave(&d->lock, flags);
if (d->flags & DEVFL_UP) {
d->nopen++;
@@ -136,13 +134,11 @@ aoeblk_open(struct inode *inode, struct file *filp)
}
static int
-aoeblk_release(struct inode *inode, struct file *filp)
+aoeblk_release(struct gendisk *disk, fmode_t mode)
{
- struct aoedev *d;
+ struct aoedev *d = disk->private_data;
ulong flags;
- d = inode->i_bdev->bd_disk->private_data;
-
spin_lock_irqsave(&d->lock, flags);
if (--d->nopen == 0) {
@@ -239,8 +235,8 @@ aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
}
static struct block_device_operations aoe_bdops = {
- .__open = aoeblk_open,
- .__release = aoeblk_release,
+ .open = aoeblk_open,
+ .release = aoeblk_release,
.getgeo = aoeblk_getgeo,
.owner = THIS_MODULE,
};