Changeset 8507

Show
Ignore:
Timestamp:
09/21/10 10:29:40 (3 years ago)
Author:
mtmoore
Message:

replace two instances of list_for_each that contained a list_del with the safe variant

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel/linux-2.6/pvfs2-kernel.h

    r7848 r8507  
    978978do {                                                         \ 
    979979    struct list_head *tmp = NULL;                            \ 
     980    struct list_head *tmp_safe = NULL;                       \ 
    980981    pvfs2_kernel_op_t *tmp_op = NULL;                        \ 
    981982                                                             \ 
    982983    spin_lock(&pvfs2_request_list_lock);                     \ 
    983     list_for_each(tmp, &pvfs2_request_list) {                \ 
     984    list_for_each_safe(tmp, tmp_safe, &pvfs2_request_list) { \ 
    984985        tmp_op = list_entry(tmp, pvfs2_kernel_op_t, list);   \ 
    985986        if (tmp_op && (tmp_op == op)) {                      \ 
     
    10811082do {                                                                 \ 
    10821083    struct list_head *tmp = NULL;                                    \ 
     1084    struct list_head *tmp_safe = NULL;                               \ 
    10831085    pvfs2_sb_info_t *pvfs2_sb = NULL;                                \ 
    10841086                                                                     \ 
    10851087    spin_lock(&pvfs2_superblocks_lock);                              \ 
    1086     list_for_each(tmp, &pvfs2_superblocks) {                         \ 
     1088    list_for_each_safe(tmp, tmp_safe, &pvfs2_superblocks) {          \ 
    10871089        pvfs2_sb = list_entry(tmp, pvfs2_sb_info_t, list);           \ 
    10881090        if (pvfs2_sb && (pvfs2_sb->sb == sb)) {                      \