aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/locks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 0e1f0df8de12..57f1d5fc876a 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1864,7 +1864,7 @@ EXPORT_SYMBOL_GPL(vfs_test_lock);
1864 1864
1865static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl) 1865static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl)
1866{ 1866{
1867 flock->l_pid = fl->fl_pid; 1867 flock->l_pid = IS_FILE_PVT(fl) ? -1 : fl->fl_pid;
1868#if BITS_PER_LONG == 32 1868#if BITS_PER_LONG == 32
1869 /* 1869 /*
1870 * Make sure we can represent the posix lock via 1870 * Make sure we can represent the posix lock via
@@ -1886,7 +1886,7 @@ static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl)
1886#if BITS_PER_LONG == 32 1886#if BITS_PER_LONG == 32
1887static void posix_lock_to_flock64(struct flock64 *flock, struct file_lock *fl) 1887static void posix_lock_to_flock64(struct flock64 *flock, struct file_lock *fl)
1888{ 1888{
1889 flock->l_pid = fl->fl_pid; 1889 flock->l_pid = IS_FILE_PVT(fl) ? -1 : fl->fl_pid;
1890 flock->l_start = fl->fl_start; 1890 flock->l_start = fl->fl_start;
1891 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 : 1891 flock->l_len = fl->fl_end == OFFSET_MAX ? 0 :
1892 fl->fl_end - fl->fl_start + 1; 1892 fl->fl_end - fl->fl_start + 1;