summaryrefslogtreecommitdiffstats
path: root/fs/fcntl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r--fs/fcntl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c
index e7c66a1bf831..e4f26165f12a 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -305,9 +305,11 @@ void f_delown(struct file *filp)
pid_t f_getown(struct file *filp)
{
pid_t pid;
+ read_lock(&filp->f_owner.lock);
pid = pid_nr(filp->f_owner.pid);
if (filp->f_owner.pid_type == PIDTYPE_PGID)
pid = -pid;
+ read_unlock(&filp->f_owner.lock);
return pid;
}