Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36745424rwd; Tue, 11 Jul 2023 05:19:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlHg/eElnwfXJyOTbCNmuSzUBjo46d4l12Ram8OLae8Z2Ua76zYHtBm4CC4AdFxdlkLkrh4K X-Received: by 2002:a19:7711:0:b0:4f8:70d8:28f8 with SMTP id s17-20020a197711000000b004f870d828f8mr11174569lfc.55.1689077963504; Tue, 11 Jul 2023 05:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689077963; cv=none; d=google.com; s=arc-20160816; b=Tu4p4pXpdZ5+J2hw7vDH/C4Z6Bq5xut1RaCr7D5d0H4CRWaeEJfAF9f6HtUPEGuYrD H6LT/DTPm67Wzef7QXnov3NfQ2Gmh3atGTK8eCEoVCxv1G5AizeTiMfnlBU987W2IfS4 U37plyfw6hr8wCfSABTAFAGmaaVfoP2Wh/IiB1sPT7yzM1ycC9mHuUtJPpe0e2M2jSua 7D1GOXw4Glb6jaWd3diOMDpozzIXY5vg5uPia+5tm5EXHPAD/ohHIr9l8A8Px7IRXs56 xnO92Gc72qGF0iKGz1vYoiG1b424dui96DlMo0td2SxBGTVOAj855YbyX2svvPKRjSXj Xxhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PncO2ajWWkvdTHGu3ZaOd6TTJNIxdoNUFuImBwf4xqs=; fh=2hdkplcc2wEiuOq/ax3yC5u47IaEe9Xr7kPJDu8nJVo=; b=cKbLXcQMeYyVZhbCoqM2I7Yu3CNu8pCiCVZzlspmlPXEmc6820lw8vJGXm93Xsec6k kpCXWT/kvcG6vrMjx+mW7MVF3gH1fBLYOMvXnk1/YDh74b/dcbRbIaCwxqRbyUgZux2v T6MF/ZkDCKtxFzM+lCTvKHpqvWOg7nvb+iZOaytsMw2vPughLqLs5VKSEnTjATRV+sXq EziydNWlCjDs33xvW+mXQn5LAzRE2NVnU+y0Jp78Jf45c2adCDG4qLv3CmUpWwgyczbu DbjhH+2fX1nLys8AbL6Qd5WHW6a0yHyofFErruDBoI2ykA+Q1erLb8RdscG2Tog/rVv6 WzUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4-20020a056402038400b0051e2a1c217csi2170119edv.556.2023.07.11.05.18.34; Tue, 11 Jul 2023 05:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbjGKMIK (ORCPT + 99 others); Tue, 11 Jul 2023 08:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbjGKMIK (ORCPT ); Tue, 11 Jul 2023 08:08:10 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40BD1E5C; Tue, 11 Jul 2023 05:08:09 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 31B7467373; Tue, 11 Jul 2023 14:08:06 +0200 (CEST) Date: Tue, 11 Jul 2023 14:08:06 +0200 From: Christoph Hellwig To: Azat Khuzhin Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH] Fix writing maj:min to /sys/power/resume (fixes hiberation with systemd) Message-ID: <20230711120806.GA27809@lst.de> References: <20230711114821.1273-1-a3at.mail@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230711114821.1273-1-a3at.mail@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 11, 2023 at 01:48:12PM +0200, Azat Khuzhin wrote: > resume_store() first calls lookup_bdev() and after tries to handle > maj:min, but it does not reset the error before, hence if you will write > maj:min you will get ENOENT: > > # echo 259:2 >| /sys/power/resume > bash: echo: write error: No such file or directory > > This also should fix hiberation via systemd, since it uses this way. Looks good: Reviewed-by: Christoph Hellwig