diff options
author | Tejun Heo <tj@kernel.org> | 2008-09-03 03:01:09 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:05 -0400 |
commit | cf771cb5a7b716f3f9e532fd42a1e3a0a75adec5 (patch) | |
tree | c16cf6adc4d2e51eaee77088ecf126b721f8f3c7 /fs/block_dev.c | |
parent | 310a2c1012934f590192377f65940cad4aa72b15 (diff) |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index aff54219e049..de0776cd7215 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) | |||
930 | struct module *owner = NULL; | 930 | struct module *owner = NULL; |
931 | struct gendisk *disk; | 931 | struct gendisk *disk; |
932 | int ret; | 932 | int ret; |
933 | int part; | 933 | int partno; |
934 | int perm = 0; | 934 | int perm = 0; |
935 | 935 | ||
936 | if (file->f_mode & FMODE_READ) | 936 | if (file->f_mode & FMODE_READ) |
@@ -949,7 +949,7 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part) | |||
949 | ret = -ENXIO; | 949 | ret = -ENXIO; |
950 | file->f_mapping = bdev->bd_inode->i_mapping; | 950 | file->f_mapping = bdev->bd_inode->i_mapping; |
951 | lock_kernel(); | 951 | lock_kernel(); |
952 | disk = get_gendisk(bdev->bd_dev, &part); | 952 | disk = get_gendisk(bdev->bd_dev, &partno); |
953 | if (!disk) { | 953 | if (!disk) { |
954 | unlock_kernel(); | 954 | unlock_kernel(); |
955 | bdput(bdev); | 955 | bdput(bdev); |
@@ -961,7 +961,7 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part) | |||
961 | if (!bdev->bd_openers) { | 961 | if (!bdev->bd_openers) { |
962 | bdev->bd_disk = disk; | 962 | bdev->bd_disk = disk; |
963 | bdev->bd_contains = bdev; | 963 | bdev->bd_contains = bdev; |
964 | if (!part) { | 964 | if (!partno) { |
965 | struct backing_dev_info *bdi; | 965 | struct backing_dev_info *bdi; |
966 | if (disk->fops->open) { | 966 | if (disk->fops->open) { |
967 | ret = disk->fops->open(bdev->bd_inode, file); | 967 | 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) | |||
989 | if (ret) | 989 | if (ret) |
990 | goto out_first; | 990 | goto out_first; |
991 | bdev->bd_contains = whole; | 991 | bdev->bd_contains = whole; |
992 | p = disk->part[part - 1]; | 992 | p = disk->part[partno - 1]; |
993 | bdev->bd_inode->i_data.backing_dev_info = | 993 | bdev->bd_inode->i_data.backing_dev_info = |
994 | whole->bd_inode->i_data.backing_dev_info; | 994 | whole->bd_inode->i_data.backing_dev_info; |
995 | if (!(disk->flags & GENHD_FL_UP) || !p || !p->nr_sects) { | 995 | if (!(disk->flags & GENHD_FL_UP) || !p || !p->nr_sects) { |