oom: rewrite error handling for oom_adj and oom_score_adj tunables
authorDavid Rientjes <rientjes@google.com>
Tue, 26 Oct 2010 21:21:25 +0000 (14:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 23:52:05 +0000 (16:52 -0700)
commit723548bff1dde9ab6bdb23f4bb92277c4da49473
tree7c4b97cb80003caae19a849e9ffb490be943bbf2
parent1e99bad0d9c12a4aaa60cd812c84ef152564bcf5
oom: rewrite error handling for oom_adj and oom_score_adj tunables

It's better to use proper error handling in oom_adjust_write() and
oom_score_adj_write() instead of duplicating the locking order on various
exit paths.

Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c