Messages in this thread | | | Date | Wed, 19 Oct 2011 09:26:57 -0400 | From | Vivek Goyal <> | Subject | Re: [PATCH 02/10] block: fix genhd refcounting in blkio_policy_parse_and_set() |
| |
On Tue, Oct 18, 2011 at 09:26:16PM -0700, Tejun Heo wrote: > blkio_policy_parse_and_set() calls blkio_check_dev_num() to check > whether the given dev_t is valid. blkio_check_dev_num() uses > get_gendisk() for verification but never puts the returned genhd > leaking the reference. > > This patch collapses blkio_check_dev_num() into its caller and updates > it such that the genhd is put before returning.
Hi Tejun,
What's the advantage of collapsing blkio_check_dev_num(). Why not put the reference to gendisk in this function before returning either success or failure.
Thanks Vivek
| |