diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 09:23:18 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:40 -0400 |
commit | 94562c175113cf91204a77269eabeea32e1f38db (patch) | |
tree | a94624caae43a5ad5d6b0a9d5afa117b4b04e553 | |
parent | 47225db519f9d54377b8598129b53a63fcc2f4e2 (diff) |
[PATCH] switch aoeblk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 16 |
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) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | static int | 120 | static int |
121 | aoeblk_open(struct inode *inode, struct file *filp) | 121 | aoeblk_open(struct block_device *bdev, fmode_t mode) |
122 | { | 122 | { |
123 | struct aoedev *d; | 123 | struct aoedev *d = bdev->bd_disk->private_data; |
124 | ulong flags; | 124 | ulong flags; |
125 | 125 | ||
126 | d = inode->i_bdev->bd_disk->private_data; | ||
127 | |||
128 | spin_lock_irqsave(&d->lock, flags); | 126 | spin_lock_irqsave(&d->lock, flags); |
129 | if (d->flags & DEVFL_UP) { | 127 | if (d->flags & DEVFL_UP) { |
130 | d->nopen++; | 128 | d->nopen++; |
@@ -136,13 +134,11 @@ aoeblk_open(struct inode *inode, struct file *filp) | |||
136 | } | 134 | } |
137 | 135 | ||
138 | static int | 136 | static int |
139 | aoeblk_release(struct inode *inode, struct file *filp) | 137 | aoeblk_release(struct gendisk *disk, fmode_t mode) |
140 | { | 138 | { |
141 | struct aoedev *d; | 139 | struct aoedev *d = disk->private_data; |
142 | ulong flags; | 140 | ulong flags; |
143 | 141 | ||
144 | d = inode->i_bdev->bd_disk->private_data; | ||
145 | |||
146 | spin_lock_irqsave(&d->lock, flags); | 142 | spin_lock_irqsave(&d->lock, flags); |
147 | 143 | ||
148 | if (--d->nopen == 0) { | 144 | if (--d->nopen == 0) { |
@@ -239,8 +235,8 @@ aoeblk_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
239 | } | 235 | } |
240 | 236 | ||
241 | static struct block_device_operations aoe_bdops = { | 237 | static struct block_device_operations aoe_bdops = { |
242 | .__open = aoeblk_open, | 238 | .open = aoeblk_open, |
243 | .__release = aoeblk_release, | 239 | .release = aoeblk_release, |
244 | .getgeo = aoeblk_getgeo, | 240 | .getgeo = aoeblk_getgeo, |
245 | .owner = THIS_MODULE, | 241 | .owner = THIS_MODULE, |
246 | }; | 242 | }; |