lkml.org 
[lkml]   [2011]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
    On 06/01/2011 03:24 AM, Mark Wu wrote:
    > - if (index_to_minor(index)>= 1<< MINORBITS)
    > - return -ENOSPC;
    > + do {
    > + if (!ida_pre_get(&vd_index_ida, GFP_KERNEL))
    > + return err;
    > +
    There's a problem in above code: err is not initialized before using, so
    change it to return -1;
    + do {
    + if (!ida_pre_get(&vd_index_ida, GFP_KERNEL))
    + return -1;



    \
     
     \ /
      Last update: 2011-06-01 10:45    [W:0.018 / U:152.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site