aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 0d68f1f81799..4f441e46cef4 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1446,7 +1446,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
1446 struct inode *inode = dentry->d_inode; 1446 struct inode *inode = dentry->d_inode;
1447 int error; 1447 int error;
1448 1448
1449 if ((current_fsuid() != inode->i_uid) && !capable(CAP_LEASE)) 1449 if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE))
1450 return -EACCES; 1450 return -EACCES;
1451 if (!S_ISREG(inode->i_mode)) 1451 if (!S_ISREG(inode->i_mode))
1452 return -EINVAL; 1452 return -EINVAL;