]> git.baikalelectronics.ru Git - kernel.git/commit
block: Warn and free bio if bi_end_io is not set
authorMuthukumar Ratty <muthur@gmail.com>
Wed, 8 Jan 2014 16:39:49 +0000 (09:39 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 8 Jan 2014 16:39:49 +0000 (09:39 -0700)
commitf9fc38656831ad2ba05b779393049de955a12003
tree00d606520db8f3ddc6071653caf05f8a7bc52f56
parentb02a72110bba879a70e44650ccb013f2482c934e
block: Warn and free bio if bi_end_io is not set

In bio_endio if bio doesn't have bi_end_io (should be an error case),
we set bio to NULL and continue silently without freeing the bio. It
would be good to have a WARN and free the bio to avoid memory leak.

Signed-off-by: Muthukumar Ratty <muthur@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/bio.c