Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4271
b: refs/heads/master
c: 7eaae28
h: refs/heads/master
i:
  4269: ba9b08f
  4267: e76750d
  4263: e6bca9d
  4255: 96b83cc
v: v3
  • Loading branch information
KAMBAROV, ZAUR authored and Linus Torvalds committed Jul 8, 2005
1 parent 0ea119b commit 4bb8fb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f96c95680bfe66ff00c91859d4c73edf539b854
refs/heads/master: 7eaae2828dadae3abde7f77734c874d4b74b313a
4 changes: 3 additions & 1 deletion trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ int fcntl_getlease(struct file *filp)
*/
static int __setlease(struct file *filp, long arg, struct file_lock **flp)
{
struct file_lock *fl, **before, **my_before = NULL, *lease = *flp;
struct file_lock *fl, **before, **my_before = NULL, *lease;
struct dentry *dentry = filp->f_dentry;
struct inode *inode = dentry->d_inode;
int error, rdlease_count = 0, wrlease_count = 0;
Expand All @@ -1287,6 +1287,8 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
if (!flp || !(*flp) || !(*flp)->fl_lmops || !(*flp)->fl_lmops->fl_break)
goto out;

lease = *flp;

error = -EAGAIN;
if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
goto out;
Expand Down

0 comments on commit 4bb8fb7

Please sign in to comment.