Merge tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton...
[platform/kernel/linux-exynos.git] / fs / fuse / file.c
index ab60051..0273029 100644 (file)
@@ -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;