aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-08-07 12:47:26 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:47:26 -0400
commitacfca3c622a009fb62b566604452ab9fb3a11019 (patch)
tree3125607a3f41283839605d18f004765d0268e5d5
parentfa1bd3591a669b92b635dbdb11d1a32a5630821b (diff)
blkfront: Remove obsolete info->users
This is just bd_openers, protected by the bd_mutex. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r--drivers/block/xen-blkfront.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 715de7d8ce01..9c5a25a462e6 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1168,9 +1168,6 @@ static int blkif_open(struct block_device *bdev, fmode_t mode)
1168 1168
1169 mutex_unlock(&info->mutex); 1169 mutex_unlock(&info->mutex);
1170 1170
1171 if (!err)
1172 ++info->users;
1173
1174out: 1171out:
1175 unlock_kernel(); 1172 unlock_kernel();
1176 return err; 1173 return err;
@@ -1183,12 +1180,13 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
1183 struct xenbus_device *xbdev; 1180 struct xenbus_device *xbdev;
1184 1181
1185 lock_kernel(); 1182 lock_kernel();
1186 if (--info->users)
1187 goto out;
1188 1183
1189 bdev = bdget_disk(disk, 0); 1184 bdev = bdget_disk(disk, 0);
1190 bdput(bdev); 1185 bdput(bdev);
1191 1186
1187 if (bdev->bd_openers)
1188 goto out;
1189
1192 /* 1190 /*
1193 * Check if we have been instructed to close. We will have 1191 * Check if we have been instructed to close. We will have
1194 * deferred this request, because the bdev was still open. 1192 * deferred this request, because the bdev was still open.
@@ -1212,7 +1210,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
1212 kfree(info); 1210 kfree(info);
1213 } 1211 }
1214 1212
1215out:
1216 unlock_kernel(); 1213 unlock_kernel();
1217 return 0; 1214 return 0;
1218} 1215}