]> git.baikalelectronics.ru Git - kernel.git/commit
proc: faster open/close of files without ->release hook
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 10 Apr 2018 23:31:01 +0000 (16:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Apr 2018 17:28:33 +0000 (10:28 -0700)
commitf60bd45b52c0c871607b11686f1d50fca869fc8e
tree896f6dbe0a8e1b1aee688b4bd61da4cb21dd7ec4
parentb035629b64479dc2c4493cfcfda75b6da896a47a
proc: faster open/close of files without ->release hook

The whole point of code in fs/proc/inode.c is to make sure ->release
hook is called either at close() or at rmmod time.

All if it is unnecessary if there is no ->release hook.

Save allocation+list manipulations under spinlock in that case.

Link: http://lkml.kernel.org/r/20180214063033.GA15579@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/inode.c