Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261506AbVCaPEs (ORCPT ); Thu, 31 Mar 2005 10:04:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261496AbVCaPDm (ORCPT ); Thu, 31 Mar 2005 10:03:42 -0500 Received: from rproxy.gmail.com ([64.233.170.203]:60478 "EHLO rproxy.gmail.com") by vger.kernel.org with ESMTP id S261498AbVCaPCi (ORCPT ); Thu, 31 Mar 2005 10:02:38 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=cqDCSEoqgd0fVF5fjO+OqVtovSwE/dj6Z+1iT/2Vjxx+QadzQElXze/uzqBWSEW8+uBLdECA0OAJokF5U3nVt9XW0PfJUr1qM/4THIyvtIajUcl/wMsGY+aFSWZaB+T7YytZSNXDxv3Eg2/1DGipKHx+lp7w9onECSVsWxLXT+g= Message-ID: Date: Thu, 31 Mar 2005 10:02:37 -0500 From: Dmitry Torokhov Reply-To: dtor_core@ameritech.net To: Pavel Machek Subject: Re: [linux-pm] Re: swsusp 'disk' fails in bk-current - intel_agp at fault? Cc: Nigel Cunningham , Linux-pm mailing list , Vojtech Pavlik , Stefan Seyfried , Linux Kernel Mailing List , Andy Isaacson In-Reply-To: <20050331083909.GA1387@elf.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <20050329181831.GB8125@elf.ucw.cz> <1112135477.29392.16.camel@desktop.cunningham.myip.net.au> <20050329223519.GI8125@elf.ucw.cz> <200503310226.03495.dtor_core@ameritech.net> <20050331083909.GA1387@elf.ucw.cz> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1068 Lines: 28 On Thu, 31 Mar 2005 10:39:10 +0200, Pavel Machek wrote: > > int swsusp_write(void) > > { > > int error; > > - device_resume(); > > lock_swapdevices(); > > error = write_suspend_image(); > > /* This will unlock ignored swap devices since writing is > > Looks good, except... why move code around? Could you just call > usermodehelper_disable from swsusp_write? That's because I don't think that swsusp_write is a proper place for it ;) It looks like a lean and mean function that does just write and manipulating usermodehelper state _and_ system (device) state is wrong. Let it do one thing, don't overload with actions that I think belong to the upper level. Do you agree? I think I need to stick in usermodehelper_enable call in case swsusp_write fails though. -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/