The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Petr Vandrovec <vandrove@vc.cvut.cz>
To: torvalds@transmeta.com
Cc: willy@debian.org, linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.34-bk fcntl lockup
Date: Sat, 14 Sep 2002 12:18:11 +0200	[thread overview]
Message-ID: <20020914101811.GA1447@ppc.vc.cvut.cz> (raw)

Hi Linus,
   please apply this. 

Fixes endless loop without schedule which happens as soon as smbd 
invokes fcntl64(7, F_SETLK64, ...). fcntl_setlk64 gets cmd F_SETLK64,
not F_SETLK tested in the loop;

Maybe return value from posix_lock_file should be changed to -EINPROGRESS 
or -EJUKEBOX instead of testing passed cmd in callers, but this oneliner 
works too. If you preffer changing posix_lock_file return value to clearly 
distinugish between -EAGAIN and lock request queued, I'll do that.
					Best regards,
						Petr Vandrovec
						vandrove@vc.cvut.cz


diff -urdN linux/fs/locks.c linux/fs/locks.c
--- linux/fs/locks.c	2002-09-13 21:49:17.000000000 +0200
+++ linux/fs/locks.c	2002-09-14 11:19:37.000000000 +0200
@@ -1588,7 +1588,7 @@
 
 	for (;;) {
 		error = posix_lock_file(filp, file_lock);
-		if ((error != -EAGAIN) || (cmd == F_SETLK))
+		if ((error != -EAGAIN) || (cmd == F_SETLK64))
 			break;
 		error = wait_event_interruptible(file_lock->fl_wait,
 				!file_lock->fl_next);

             reply	other threads:[~2002-09-14 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-14 10:18 Petr Vandrovec [this message]
2002-09-14 13:41 ` [PATCH] 2.5.34-bk fcntl lockup Matthew Wilcox

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=20020914101811.GA1447@ppc.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=willy@debian.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