summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-09-03 09:01:09 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:05 +0200
commitcf771cb5a7b716f3f9e532fd42a1e3a0a75adec5 (patch)
treec16cf6adc4d2e51eaee77088ecf126b721f8f3c7 /fs/block_dev.c
parent310a2c1012934f590192377f65940cad4aa72b15 (diff)
downloadop-kernel-dev-cf771cb5a7b716f3f9e532fd42a1e3a0a75adec5.zip
op-kernel-dev-cf771cb5a7b716f3f9e532fd42a1e3a0a75adec5.tar.gz
block: make variable and argument names more consistent
In hd_struct, @partno is used to denote partition number and a number of other places use @part to denote hd_struct. Functions use @part and @index instead. This causes confusion and makes it difficult to use consistent variable names for hd_struct. Always use @partno if a variable represents partition number. Also, print out functions use @f or @part for seq_file argument. Use @seqf uniformly instead. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index aff5421..de0776c 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -930,7 +930,7 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
struct module *owner = NULL;
struct gendisk *disk;
int ret;
- int part;
+ int partno;
int perm = 0;
if (file->f_mode & FMODE_READ)
@@ -949,7 +949,7 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
ret = -ENXIO;
file->f_mapping = bdev->bd_inode->i_mapping;
lock_kernel();
- disk = get_gendisk(bdev->bd_dev, &part);
+ disk = get_gendisk(bdev->bd_dev, &partno);
if (!disk) {
unlock_kernel();
bdput(bdev);
@@ -961,7 +961,7 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
if (!bdev->bd_openers) {
bdev->bd_disk = disk;
bdev->bd_contains = bdev;
- if (!part) {
+ if (!partno) {
struct backing_dev_info *bdi;
if (disk->fops->open) {
ret = disk->fops->open(bdev->bd_inode, file);
@@ -989,7 +989,7 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
if (ret)
goto out_first;
bdev->bd_contains = whole;
- p = disk->part[part - 1];
+ p = disk->part[partno - 1];
bdev->bd_inode->i_data.backing_dev_info =
whole->bd_inode->i_data.backing_dev_info;
if (!(disk->flags & GENHD_FL_UP) || !p || !p->nr_sects) {
OpenPOWER on IntegriCloud