Skip to content

Commit

Permalink
[PATCH] switch aoeblk
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 21, 2008
1 parent 47225db commit 94562c1
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions drivers/block/aoe/aoeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand All @@ -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) {
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit 94562c1

Please sign in to comment.