lkml.org 
[lkml]   [2000]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectProblem&patch: Linux 2.2.15pre13 linux/fs/dquot.c warning
    Dear Sir or Madam,
    I get a warning while compiling a 2.2.15pre13 kernel, the message is:

    # (make dep; make zlilo ; make modules ; make modules_install)>log 2>&1 &
    # egrep "(warning:|error:)" log dquot.c:542: warning: `count' might be
    used uninitialized in this function

    ...and 14 more in 8 files. But this one is at the top of the list & seems
    simple enough for my skills.

    The only places count is used in thsi routine is at:
    ####################################################
    int count;
    .
    ...
    .
    // printk(KERN_DEBUG "get_empty_dquot: pruning %d\n", count);
    if (prune_dcache(0, 128))
    {
    free_inode_memory(count);
    goto repeat;
    }
    ####################################################

    And the free_inode_memory(int count) routine in fs/inode.c ignores its
    parameter, so do you think maybe a patch like below would be good?

    ###############################################################
    --- linux-2.2.14-dist/fs/dquot.c Tue Jan 4 13:12:23 2000
    +++ linux/fs/dquot.c Sat Mar 4 02:47:35 2000
    @@ -539,7 +539,6 @@
    struct dquot *get_empty_dquot(void)
    {
    struct dquot *dquot;
    - int count;

    repeat:
    dquot = find_best_free();
    @@ -569,10 +568,10 @@
    /*
    * Try pruning the dcache to free up some dquots ...
    */
    - printk(KERN_DEBUG "get_empty_dquot: pruning %d\n", count);
    +// printk(KERN_DEBUG "get_empty_dquot: pruning\n");
    if (prune_dcache(0, 128))
    {
    - free_inode_memory(count);
    + free_inode_memory(1);
    goto repeat;
    }
    #############################################################

    Although I dont use quotas, I've made this patch, recompiled & rebooted &
    2.2.15pre13 seems to be running for me.

    Dave
    --
    Dave Forrest dforrest@virginia.edu
    (804)296-7283h 924-3954w http://www.people.virginia.edu/~drf5n/




    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:56    [W:0.022 / U:0.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site