Skip to content

Commit

Permalink
orangefs: use list_for_each_entry_safe in purge_waiting_ops
Browse files Browse the repository at this point in the history
set_op_state_purged can delete the op.

Signed-off-by: Martin Brandenburg <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Martin Brandenburg authored and torvalds committed Jan 22, 2018
1 parent 7222708 commit 0afc0de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/orangefs/waitqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ static void orangefs_clean_up_interrupted_operation(struct orangefs_kernel_op_s
*/
void purge_waiting_ops(void)
{
struct orangefs_kernel_op_s *op;
struct orangefs_kernel_op_s *op, *tmp;

spin_lock(&orangefs_request_list_lock);
list_for_each_entry(op, &orangefs_request_list, list) {
list_for_each_entry_safe(op, tmp, &orangefs_request_list, list) {
gossip_debug(GOSSIP_WAIT_DEBUG,
"pvfs2-client-core: purging op tag %llu %s\n",
llu(op->tag),
Expand Down

0 comments on commit 0afc0de

Please sign in to comment.