diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-13 15:25:59 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-13 15:25:59 +0100 |
commit | 30beab1491f0b96b2f23d3fb68af01fd921a16d8 (patch) | |
tree | c580bdc0846269fbb10feeda901ecec1a48ee2ef /fs/locks.c | |
parent | 21af6c4f2aa5f63138871b4ddd77d7ebf2588c9d (diff) | |
parent | c32511e2718618f0b53479eb36e07439aa363a74 (diff) | |
download | linux-3.10-30beab1491f0b96b2f23d3fb68af01fd921a16d8.tar.gz linux-3.10-30beab1491f0b96b2f23d3fb68af01fd921a16d8.tar.bz2 linux-3.10-30beab1491f0b96b2f23d3fb68af01fd921a16d8.zip |
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c index a0bc03495bd..29fa5da6c11 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -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; @@ -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; |