summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/compat/linux/linux_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 2eea67b69b1f..5736bc393b74 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -126,8 +126,8 @@ linux_open(struct thread *td, struct linux_open_args *args)
SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
struct file *fp;
- error = fget(td, td->td_retval[0], &fp);
PROC_UNLOCK(p);
+ error = fget(td, td->td_retval[0], &fp);
if (!error) {
if (fp->f_type == DTYPE_VNODE)
fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0, td->td_ucred,