From ac8861f9c367635dfb17f2ce63a36fc514874f21 Mon Sep 17 00:00:00 2001 From: "David M. Richter" Date: Wed, 23 Apr 2008 16:29:01 -0400 Subject: [PATCH] --- yaml --- r: 92968 b: refs/heads/master c: 190855576743a510219fc67886dace29b825d8cb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/locks.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 015e1111ca8a..3f4fd93a540c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 288b2fd8251cb0bcb14b8a93755ef9c78de70e0f +refs/heads/master: 190855576743a510219fc67886dace29b825d8cb diff --git a/trunk/fs/locks.c b/trunk/fs/locks.c index da1d0ddb4abd..6a132cd4fa57 100644 --- a/trunk/fs/locks.c +++ b/trunk/fs/locks.c @@ -1368,6 +1368,11 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) lease = *flp; if (arg != F_UNLCK) { + error = -ENOMEM; + new_fl = locks_alloc_lock(); + if (new_fl == NULL) + goto out; + error = -EAGAIN; if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0)) goto out; @@ -1375,11 +1380,6 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) && ((atomic_read(&dentry->d_count) > 1) || (atomic_read(&inode->i_count) > 1))) goto out; - - error = -ENOMEM; - new_fl = locks_alloc_lock(); - if (new_fl == NULL) - goto out; } /*