From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265142AbTFRKfS (ORCPT ); Wed, 18 Jun 2003 06:35:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265151AbTFRKfS (ORCPT ); Wed, 18 Jun 2003 06:35:18 -0400 Received: from smtp-out1.iol.cz ([194.228.2.86]:3975 "EHLO smtp-out1.iol.cz") by vger.kernel.org with ESMTP id S265142AbTFRKfG (ORCPT ); Wed, 18 Jun 2003 06:35:06 -0400 Date: Wed, 18 Jun 2003 12:48:45 +0200 From: Pavel Machek To: trond.myklebust@fys.uio.no, Rusty trivial patch monkey Russell , kernel list Subject: Fix suspend with NFS mounts active Message-ID: <20030618104844.GA398@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.3i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi! This fixes suspend with NFS mounts active. Please apply, Pavel --- /usr/src/tmp/linux/fs/lockd/svc.c 2003-02-15 18:51:27.000000000 +0100 +++ /usr/src/linux/fs/lockd/svc.c 2003-06-15 20:17:30.000000000 +0200 @@ -34,6 +34,7 @@ #include #include #include +#include #define NLMDBG_FACILITY NLMDBG_SVC #define LOCKD_BUFSIZE (1024 + NLMSVC_XDRSIZE) @@ -118,9 +119,11 @@ * NFS mount or NFS daemon has gone away, and we've been sent a * signal, or else another process has taken over our job. */ - while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) - { + while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) { long timeout = MAX_SCHEDULE_TIMEOUT; + + if (current->flags & PF_FREEZE) + refrigerator(PF_IOTHREAD); if (signalled()) { flush_signals(current); if (nlmsvc_ops) { --- /usr/src/tmp/linux/net/sunrpc/sched.c 2003-05-27 13:44:18.000000000 +0200 +++ /usr/src/linux/net/sunrpc/sched.c 2003-06-15 20:16:46.000000000 +0200 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -969,6 +970,8 @@ flush_signals(current); } __rpc_schedule(); + if (current->flags & PF_FREEZE) + refrigerator(PF_IOTHREAD); if (++rounds >= 64) { /* safeguard */ schedule(); -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]