aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 316e474c5fdb..c74c9df419bc 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1718,8 +1718,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
1718{ 1718{
1719 int error = -EAGAIN; 1719 int error = -EAGAIN;
1720 struct file_lock *fl, *victim = NULL; 1720 struct file_lock *fl, *victim = NULL;
1721 struct dentry *dentry = filp->f_path.dentry; 1721 struct inode *inode = file_inode(filp);
1722 struct inode *inode = dentry->d_inode;
1723 struct file_lock_context *ctx; 1722 struct file_lock_context *ctx;
1724 LIST_HEAD(dispose); 1723 LIST_HEAD(dispose);
1725 1724
@@ -1759,8 +1758,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
1759int generic_setlease(struct file *filp, long arg, struct file_lock **flp, 1758int generic_setlease(struct file *filp, long arg, struct file_lock **flp,
1760 void **priv) 1759 void **priv)
1761{ 1760{
1762 struct dentry *dentry = filp->f_path.dentry; 1761 struct inode *inode = file_inode(filp);
1763 struct inode *inode = dentry->d_inode;
1764 int error; 1762 int error;
1765 1763
1766 if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE)) 1764 if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE))
@@ -2115,7 +2113,7 @@ static int do_lock_file_wait(struct file *filp, unsigned int cmd,
2115 return error; 2113 return error;
2116} 2114}
2117 2115
2118/* Ensure that fl->fl_filp has compatible f_mode for F_SETLK calls */ 2116/* Ensure that fl->fl_file has compatible f_mode for F_SETLK calls */
2119static int 2117static int
2120check_fmode_for_setlk(struct file_lock *fl) 2118check_fmode_for_setlk(struct file_lock *fl)
2121{ 2119{