kernel/umh.c: optimize 'proc_cap_handler()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 17 Nov 2017 23:27:32 +0000 (15:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Nov 2017 00:10:01 +0000 (16:10 -0800)
commit8c703d660450c4df72ff24f79a335dc7973a9dc8
treee7eecbd614bbd2548d82ba66b5b28cb7e7840bf6
parent4ca59b14e588f873795a11cdc77a25c686a29d23
kernel/umh.c: optimize 'proc_cap_handler()'

If 'write' is 0, we can avoid a call to spin_lock/spin_unlock.

Link: http://lkml.kernel.org/r/20171020193331.7233-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/umh.c