소스 검색

[IA64] use goto to jump out do/while_each_thread

do_each_thread/while_each_thread is a double loop, so
should use 'goto' rather than 'break' to break out
the loop.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Li Zefan 17 년 전
부모
커밋
6794c75266
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      arch/ia64/kernel/perfmon.c

+ 2 - 2
arch/ia64/kernel/perfmon.c

@@ -4204,10 +4204,10 @@ pfm_check_task_exist(pfm_context_t *ctx)
 	do_each_thread (g, t) {
 		if (t->thread.pfm_context == ctx) {
 			ret = 0;
-			break;
+			goto out;
 		}
 	} while_each_thread (g, t);
-
+out:
 	read_unlock(&tasklist_lock);
 
 	DPRINT(("pfm_check_task_exist: ret=%d ctx=%p\n", ret, ctx));