[lkml]   [2001]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectAnother bug? linux/fs/nfs/write.c

The following mail from Matt describes a problem in the NFS
read/write code that can cause a vicious hang. Obvious patch to fix it
is attached...


>>>>> " " == Matt Chapman <> writes:

> Trond, Here's another bug which seems to be causing crashes.

> nfs_update_request keeps calling nfs_wait_on_request until the
> request can be locked. Presumably it's relying on
> nfs_wait_on_request to schedule, and hence run rpciod to
> retransmit any lost requests. However, if the fs is mounted
> with the intr option and a signal has arrived, then
> nfs_wait_on_request (ultimately, wait_event_interruptible)
> returns immediately with -ERESTARTSYS, and the loop spins.

> Presumably nfs_update_request needs to check the return value
> of nfs_wait_on_request and return right up the chain on
> -ERESTARTSYS. However, since I don't know this code very well,
> I'd prefer it if you had a look at it and gave some advice.

diff -u --recursive --new-file linux-2.4.5-fixes/fs/nfs/write.c linux-2.4.5-write/fs/nfs/write.c
--- linux-2.4.5-fixes/fs/nfs/write.c Mon May 21 11:34:51 2001
+++ linux-2.4.5-write/fs/nfs/write.c Mon May 21 13:18:47 2001
@@ -863,9 +863,12 @@
req = _nfs_find_request(inode, page);
if (req) {
if (!nfs_lock_request(req)) {
+ int error;
- nfs_wait_on_request(req);
+ error = nfs_wait_on_request(req);
+ if (error < 0)
+ return ERR_PTR(error);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 12:53    [W:0.052 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site