[lkml]   [2008]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 1/2] mm: change dirty limit type specifiers to unsigned long
    On Mon, 24 Nov 2008, Peter Zijlstra wrote:

    > This didn't pop up any weird and wonderfull assumptions on the
    > signed-ness of these variables I take it :-)

    It didn't; in fact, callers already used them as though they were
    unsigned. For example, bdi_debug_stats_show():

    "BdiDirtyThresh: %8lu kB\n"
    "DirtyThresh: %8lu kB\n"
    "BackgroundThresh: %8lu kB\n",

    And get_dirty_limits() itself implicitly uses an unsigned type specifier
    for the long *pbdi_dirty limit:

    if (bdi) {
    u64 bdi_dirty;
    *pbdi_dirty = bdi_dirty;

    And, given that the remainder of the get_dirty_limits() callers simply use
    these for comparisons to the ZVC global_page_state() values, which are
    also unsigned long, this conversion is safe.

    Thanks Peter!

     \ /
      Last update: 2008-11-24 20:53    [W:0.019 / U:35.020 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site