From 4bb8fb7e22de8f394d6714e2fce7b17dd8717969 Mon Sep 17 00:00:00 2001 From: "KAMBAROV, ZAUR" Date: Thu, 7 Jul 2005 17:57:06 -0700 Subject: [PATCH] --- yaml --- r: 4271 b: refs/heads/master c: 7eaae2828dadae3abde7f77734c874d4b74b313a h: refs/heads/master i: 4269: ba9b08f478b7543e64574ebfc3654cf33e6310b2 4267: e76750d7dcb6a5081ca870aff716f1f9ba10c4e6 4263: e6bca9d0b8629b7e6166d19d846f88ed41321be9 4255: 96b83cc15c0020931991e0ffffbb543d63f424e9 v: v3 --- [refs] | 2 +- trunk/fs/locks.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 34ce14f0ef35..2c2f2f3db672 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8f96c95680bfe66ff00c91859d4c73edf539b854 +refs/heads/master: 7eaae2828dadae3abde7f77734c874d4b74b313a diff --git a/trunk/fs/locks.c b/trunk/fs/locks.c index a0bc03495bd4..29fa5da6c117 100644 --- a/trunk/fs/locks.c +++ b/trunk/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;