public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: torvalds@osdl.org
Subject: Re: Linux 2.6.16.16
Date: Wed, 10 May 2006 19:29:38 -0700	[thread overview]
Message-ID: <20060511022938.GF25010@moss.sous-sol.org> (raw)
In-Reply-To: <20060511022547.GE25010@moss.sous-sol.org>

diff --git a/Makefile b/Makefile
index cdd3ce7..b93f75f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 16
-EXTRAVERSION = .15
+EXTRAVERSION = .16
 NAME=Sliding Snow Leopard
 
 # *DOCUMENTATION*
diff --git a/fs/locks.c b/fs/locks.c
index e75ac39..aa7f660 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -432,15 +432,14 @@ static struct lock_manager_operations le
  */
 static int lease_init(struct file *filp, int type, struct file_lock *fl)
  {
+	if (assign_type(fl, type) != 0)
+		return -EINVAL;
+
 	fl->fl_owner = current->files;
 	fl->fl_pid = current->tgid;
 
 	fl->fl_file = filp;
 	fl->fl_flags = FL_LEASE;
-	if (assign_type(fl, type) != 0) {
-		locks_free_lock(fl);
-		return -EINVAL;
-	}
 	fl->fl_start = 0;
 	fl->fl_end = OFFSET_MAX;
 	fl->fl_ops = NULL;
@@ -452,16 +451,19 @@ static int lease_init(struct file *filp,
 static int lease_alloc(struct file *filp, int type, struct file_lock **flp)
 {
 	struct file_lock *fl = locks_alloc_lock();
-	int error;
+	int error = -ENOMEM;
 
 	if (fl == NULL)
-		return -ENOMEM;
+		goto out;
 
 	error = lease_init(filp, type, fl);
-	if (error)
-		return error;
+	if (error) {
+		locks_free_lock(fl);
+		fl = NULL;
+	}
+out:
 	*flp = fl;
-	return 0;
+	return error;
 }
 
 /* Check if two locks overlap each other.
@@ -1337,6 +1339,7 @@ static int __setlease(struct file *filp,
 		goto out;
 
 	if (my_before != NULL) {
+		*flp = *my_before;
 		error = lease->fl_lmops->fl_change(my_before, arg);
 		goto out;
 	}

  reply	other threads:[~2006-05-11  2:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-11  2:25 Linux 2.6.16.16 Chris Wright
2006-05-11  2:29 ` Chris Wright [this message]
2006-05-11 10:34 ` Maciej Soltysiak
2006-05-11 11:07   ` Nick Warne
2006-05-11 16:50   ` Daniel Barkalow
2006-05-11 17:33   ` Chris Wright
2006-05-11 18:03     ` BUG: soft lockup detected on CPU#0! Winn Johnston
2006-05-12 15:51       ` Winn Johnston
2006-05-13 15:35     ` Linux 2.6.16.16 Ingo Oeser
2006-05-13 15:56       ` Adrian Bunk
2006-05-13 17:29         ` Nick Warne
2006-05-14  3:59           ` Greg KH
2006-05-14  5:17             ` Willy Tarreau
2006-05-15 17:57               ` Chris Wright
2006-05-14  7:46             ` Maciej Soltysiak
2006-05-15 16:30               ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060511022938.GF25010@moss.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox