proc_lookupfd_common(): don't bother with instantiate unless the file is open
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 3 May 2018 02:42:22 +0000 (22:42 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 May 2018 18:28:04 +0000 (14:28 -0400)
commit1ae9bd8b7e4912b238a14adc7c559a7ecbb9c062
tree118b9f6c708060ea5286d46a879b5efd5c3a4ef7
parent1bbc55131e59bd099fdc568d3aa0b42634dbd188
proc_lookupfd_common(): don't bother with instantiate unless the file is open

... and take the "check if file is open, pick ->f_mode" into a helper;
tid_fd_revalidate() can use it.

The next patch will get rid of tid_fd_revalidate() calls in instantiate
callbacks.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/proc/fd.c