linux: avoid overhead of P_CONTROLT checks if possible

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mateusz Guzik 2019-11-20 12:06:29 +00:00
parent 1fccb43c39
commit 4de1818baf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354891

View File

@ -137,6 +137,8 @@ linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int mod
error = ELOOP;
goto done;
}
if (p->p_flag & P_CONTROLT)
goto done;
if (bsd_flags & O_NOCTTY)
goto done;