From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF6E8C54EE9 for ; Tue, 20 Sep 2022 08:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbiITITT (ORCPT ); Tue, 20 Sep 2022 04:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231127AbiITISh (ORCPT ); Tue, 20 Sep 2022 04:18:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9A3867CB8 for ; Tue, 20 Sep 2022 01:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663661724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/e/evqGTFru+f3l3LD+eG8BtO8WljnsYCWvP+vFWoVo=; b=gJQTRcanVExgz9n6/+0BVIEZAXSTpBbwLFuPsbYoA5yQipnzhvQCuJ2131/TyP1UWvSLLx 2LnDLL802JxUHK8fRmMMn39M6XoPKCMJEwanuyS77zaMWDq+18GKBavbwisY5Q+voSUdh7 jrSJu330HMuyfNP8/SY9G9kFfNZUS04= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-654-purNa9ToMgWsjELKNeBfTQ-1; Tue, 20 Sep 2022 04:15:23 -0400 X-MC-Unique: purNa9ToMgWsjELKNeBfTQ-1 Received: by mail-wr1-f71.google.com with SMTP id q25-20020adfb199000000b0022ae4ea0afcso829902wra.8 for ; Tue, 20 Sep 2022 01:15:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=/e/evqGTFru+f3l3LD+eG8BtO8WljnsYCWvP+vFWoVo=; b=evITh3/Rm/o85YCpbg5kdYzLvQivYH551WKdRnhVLQKvcRVI4uv8ldHqrvFkm/Uf7h +rn67hKRdYw+Mr32lPpKrDXsps0mx/4WQRPq6aBEdbvtNqFoM9ScFL7BAj9x3hPgBbpi j4a9sLIFQ9BFV+F5/QOXJH0JAb+Qdhq4Hn1b4IfuFE1hJz60+zui09wd7YQp2Ykn96aa zYwUfOcwi0tVb9wIQjNvzQThs0mfZLWm5Gj4Kp3458REDXNHo1rbckr6NLJou6Cinu8L a4ixk7+pxz4voP856o0JwEFRALs/YBjh0LeY5TBE3ATfeZf1jC9ZHskdtxUqUn5eSKVk q4XA== X-Gm-Message-State: ACrzQf1NcMI0kqRh7qLh7TSicUDa3ebNL/kJX9AWILEmlOwa6VwBiq+x iXHuEKnXNTdS86waOGQuIYCRnC0IinppYQFhY1SBFrLe5Nwa6AoyOJLdJAMFJQmi+YT5r/Em4fB 1WQg3I8ccTrf1dq4bVTk1uk4v X-Received: by 2002:a05:600c:23ca:b0:3b4:6199:8ab9 with SMTP id p10-20020a05600c23ca00b003b461998ab9mr1396439wmb.20.1663661722189; Tue, 20 Sep 2022 01:15:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5pb0rzdBr6watv2OP+RIFajUY8ofPhVTXwU2pExV8u2gef6cxMTASlsrhhKQd0N+G4n5cOww== X-Received: by 2002:a05:600c:23ca:b0:3b4:6199:8ab9 with SMTP id p10-20020a05600c23ca00b003b461998ab9mr1396424wmb.20.1663661721920; Tue, 20 Sep 2022 01:15:21 -0700 (PDT) Received: from ?IPV6:2003:cb:c712:2300:e82d:5a58:4fd8:c1e6? (p200300cbc7122300e82d5a584fd8c1e6.dip0.t-ipconnect.de. [2003:cb:c712:2300:e82d:5a58:4fd8:c1e6]) by smtp.gmail.com with ESMTPSA id a5-20020adfe5c5000000b00228de58ae2bsm901775wrn.12.2022.09.20.01.15.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 01:15:21 -0700 (PDT) Message-ID: <749470a3-e1c7-dc60-d7b7-4e5e3ffde8dd@redhat.com> Date: Tue, 20 Sep 2022 10:15:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH 2/3] lib/notifier-error-inject: fix error when writing -errno to debugfs file Content-Language: en-US To: Akinobu Mita , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-fsdevel@vger.kernel.org, corbet@lwn.net, osalvador@suse.de, shuah@kernel.org, Zhao Gongyi , Wei Yongjun , Yicong Yang , Greg Kroah-Hartman , "Rafael J. Wysocki" , Alexander Viro , akpm@linux-foundation.org References: <20220919172418.45257-1-akinobu.mita@gmail.com> <20220919172418.45257-3-akinobu.mita@gmail.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220919172418.45257-3-akinobu.mita@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.09.22 19:24, Akinobu Mita wrote: > The simple attribute files do not accept a negative value since the > commit 488dac0c9237 ("libfs: fix error cast of negative value in > simple_attr_write()"). > > This restores the previous behaviour by using newly introduced > DEFINE_SIMPLE_ATTRIBUTE_SIGNED instead of DEFINE_SIMPLE_ATTRIBUTE. > > Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") > Reported-by: Zhao Gongyi > Signed-off-by: Akinobu Mita > --- > lib/notifier-error-inject.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/notifier-error-inject.c b/lib/notifier-error-inject.c > index 21016b32d313..2b24ea6c9497 100644 > --- a/lib/notifier-error-inject.c > +++ b/lib/notifier-error-inject.c > @@ -15,7 +15,7 @@ static int debugfs_errno_get(void *data, u64 *val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(fops_errno, debugfs_errno_get, debugfs_errno_set, > +DEFINE_SIMPLE_ATTRIBUTE_SIGNED(fops_errno, debugfs_errno_get, debugfs_errno_set, > "%lld\n"); > > static struct dentry *debugfs_create_errno(const char *name, umode_t mode, Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb