Changeset 8847

Show
Ignore:
Timestamp:
05/30/11 11:48:53 (2 years ago)
Author:
mtmoore
Message:

fix kernel panic when kernel uses unnumbered sysctl entries. pass CTL_NONE through to UNNUMBERED_OR_VAL #define so the end of the tables are well defined as 0.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/src/kernel/linux-2.6/pvfs2-proc.c

    r8687 r8847  
    436436 */ 
    437437#ifdef CTL_UNNUMBERED 
    438 #define UNNUMBERED_OR_VAL(x) CTL_UNNUMBERED 
     438#define UNNUMBERED_OR_VAL(x) ((x==CTL_NONE) ? CTL_NONE : CTL_UNNUMBERED) 
    439439#else 
    440440#define UNNUMBERED_OR_VAL(x) x 
     
    493493        .extra1 = &acache_rec_extra, 
    494494    }, 
    495     { CTL_NAME(0) } 
     495    { CTL_NAME(CTL_NONE) } 
    496496}; 
    497497static ctl_table pvfs2_static_acache_table[] = { 
     
    532532        .extra1 = &static_acache_rec_extra, 
    533533    }, 
    534     { CTL_NAME(0) } 
     534    { CTL_NAME(CTL_NONE) } 
    535535}; 
    536536 
     
    572572        .extra1 = &ncache_rec_extra 
    573573    }, 
    574     { CTL_NAME(0) } 
     574    { CTL_NAME(CTL_NONE) } 
    575575}; 
    576576static int acache_perf_count = PVFS2_PERF_COUNT_REQUEST_ACACHE; 
     
    602602        .extra1 = &ncache_perf_count 
    603603    }, 
    604     { CTL_NAME(0) } 
     604    { CTL_NAME(CTL_NONE) } 
    605605}; 
    606606 
     
    640640        .proc_handler = &proc_dointvec, 
    641641    }, 
    642     { CTL_NAME(0) } 
     642    { CTL_NAME(CTL_NONE) } 
    643643}; 
    644644 
     
    763763        .child = pvfs2_stats_table 
    764764    }, 
    765     { CTL_NAME(0) } 
     765    { CTL_NAME(CTL_NONE) } 
    766766}; 
    767767static ctl_table fs_table[] = { 
     
    772772        .child = pvfs2_table 
    773773    }, 
    774     { CTL_NAME(0) } 
     774    { CTL_NAME(CTL_NONE) } 
    775775}; 
    776776#endif