Re: [PATCH 1/8] block/genhd.c: Add error handling

2015-11-10 Thread Jeff Moyer
Jens Axboe writes: > On 11/09/2015 08:33 PM, Al Viro wrote: >> On Fri, Nov 06, 2015 at 05:52:08PM +0530, Vishnu Pratap Singh wrote: >> >> Have you even tried to trigger the failure exits you've added? The >> more you've successfully set up, the _less_ your cleanup code ends >> up undoing; that s

Re: [PATCH 1/8] block/genhd.c: Add error handling

2015-11-09 Thread Jens Axboe
On 11/09/2015 08:33 PM, Al Viro wrote: On Fri, Nov 06, 2015 at 05:52:08PM +0530, Vishnu Pratap Singh wrote: Have you even tried to trigger the failure exits you've added? The more you've successfully set up, the _less_ your cleanup code ends up undoing; that simply can't be right. That aside,

Re: [PATCH 1/8] block/genhd.c: Add error handling

2015-11-09 Thread Al Viro
On Fri, Nov 06, 2015 at 05:52:08PM +0530, Vishnu Pratap Singh wrote: Have you even tried to trigger the failure exits you've added? The more you've successfully set up, the _less_ your cleanup code ends up undoing; that simply can't be right. That aside, as soon as we'd done register_disk(), the

[PATCH 1/8] block/genhd.c: Add error handling

2015-11-06 Thread Vishnu Pratap Singh
This patch adds error handling for blk_register_region(), register_disk(), add_disk(), disk_alloc_events() & disk_add_events(). add_disk() & register_disk() functions error handling is very much needed as this is used mainly by many modules like mmc, zram, mtd, scsi etc. But there is no error hand