summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-06 13:43:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-06 13:43:26 -0700
commit066dea8c30ae7d8e061145bcf5422ce0773582eb (patch)
tree2de9df544b2961bb5a6690978908e7749c7f19c0 /fs/fuse
parentc7f396f12fb3644ff325acb2384b64c8eea7a746 (diff)
parent3953704fde7ec47f452ce6446fb7a0d5dc2f74df (diff)
downloadlinux-066dea8c30ae7d8e061145bcf5422ce0773582eb.tar.bz2
Merge tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux
Pull file locking updates from Jeff Layton: "This pile just has a few file locking fixes from Ben Coddington. There are a couple of cleanup patches + an attempt to bring sanity to the l_pid value that is reported back to userland on an F_GETLK request. After a few gyrations, he came up with a way for filesystems to communicate to the VFS layer code whether the pid should be translated according to the namespace or presented as-is to userland" * tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: restore a warn for leaked locks on close fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks fs/locks: Use allocation rather than the stack in fcntl_getlk()
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index ab60051be6e5..0273029b1220 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -2102,11 +2102,11 @@ static int convert_fuse_file_lock(struct fuse_conn *fc,
fl->fl_end = ffl->end;
/*
- * Convert pid into the caller's pid namespace. If the pid
- * does not map into the namespace fl_pid will get set to 0.
+ * Convert pid into init's pid namespace. The locks API will
+ * translate it into the caller's pid namespace.
*/
rcu_read_lock();
- fl->fl_pid = pid_vnr(find_pid_ns(ffl->pid, fc->pid_ns));
+ fl->fl_pid = pid_nr_ns(find_pid_ns(ffl->pid, fc->pid_ns), &init_pid_ns);
rcu_read_unlock();
break;