summaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-11-10 15:29:58 +0900
committerJens Axboe <jens.axboe@oracle.com>2008-11-18 15:08:56 +0100
commitba32929a91fe2c0628f5be62d1597b379c8d3062 (patch)
tree09ea54ed2d2299d25b92fee6a6dde4d7527a3d37 /include/linux/genhd.h
parenteb60fa1066622ddb2278732cf61e0c4544e82c6f (diff)
downloadop-kernel-dev-ba32929a91fe2c0628f5be62d1597b379c8d3062.zip
op-kernel-dev-ba32929a91fe2c0628f5be62d1597b379c8d3062.tar.gz
block: make add_partition() return pointer to hd_struct
Make add_partition() return pointer to the new hd_struct on success and ERR_PTR() value on failure. This change will be used to fix md autodetection bug. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index e439e6a..3df7742 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -522,7 +522,9 @@ extern char *disk_name (struct gendisk *hd, int partno, char *buf);
extern int disk_expand_part_tbl(struct gendisk *disk, int target);
extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
-extern int __must_check add_partition(struct gendisk *, int, sector_t, sector_t, int);
+extern struct hd_struct * __must_check add_partition(struct gendisk *disk,
+ int partno, sector_t start,
+ sector_t len, int flags);
extern void delete_partition(struct gendisk *, int);
extern void printk_all_partitions(void);
OpenPOWER on IntegriCloud