diff -ur linux-2.4.21/fs/nfs/file.c nfs/fs/nfs/file.c --- linux-2.4.21/fs/nfs/file.c 2003-10-01 15:21:20.000000000 +0200 +++ nfs/fs/nfs/file.c 2003-10-01 15:30:09.000000000 +0200 @@ -325,8 +325,16 @@ status2 = filemap_fdatawait(inode->i_mapping); if (status2 && !status) status = status2; - if (status < 0) - return status; + /* Note: Ignore status if we're cleaning up locks on process exit */ + if (status < 0) { + if (!(current->flags & PF_EXITING) || fl->fl_type != F_UNLCK) + return status; + if (status != -ERESTARTSYS && status != -EINTR) { + printk(KERN_NOTICE "nfs_lock: process exiting, ignoring error %d " + "that occurred when flushing data\n", -status); + } + } + lock_kernel(); status = nlmclnt_proc(inode, cmd, fl);