lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-10-19 15:29    [W:0.162 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site