Skip to content

Commit

Permalink
[PATCH] sys_ioprio_set: minor do_each_thread+break fix
Browse files Browse the repository at this point in the history
From include/linux/sched.h:

         * Careful: do_each_thread/while_each_thread is a double loop so
         *          'break' will not work as expected - use goto instead.
         */

Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Jens Axboe committed Aug 21, 2006
1 parent ef7d1b2 commit 78bd4d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ioprio.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
continue;
ret = set_task_ioprio(p, ioprio);
if (ret)
break;
goto free_uid;
} while_each_thread(g, p);

free_uid:
if (who)
free_uid(user);
break;
Expand Down

0 comments on commit 78bd4d4

Please sign in to comment.