On Thu, 31 Mar 2005 10:39:10 +0200, Pavel Machek <pavel@xxxxxxx> 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