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 86D80C6FA82 for ; Tue, 20 Sep 2022 08:22:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231424AbiITIV7 (ORCPT ); Tue, 20 Sep 2022 04:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbiITIUy (ORCPT ); Tue, 20 Sep 2022 04:20:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18BE1B6A for ; Tue, 20 Sep 2022 01:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663661968; 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=5gk3kLlspQCYjPujhZljAtxcOT9dALJ6AajDjY8rEpQ=; b=d3PXYXT+YXcQoPdJ7SmI+s9Guxv/wwEDvKFSGiUh+JMn24YBuP0Tv+HFVNub0GGFhdEaLw A2LYsDZAmjkuLlk8ppGDDk1rrhKixQxbgf4MCRUATRbpxPTDtAv816wnXDedFL6sNsapkZ 5R2C8LY05fJfILxM6y2jMysVAjAowhs= 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-503-KEhnBH9HM4yrtAe4-uol9A-1; Tue, 20 Sep 2022 04:19:26 -0400 X-MC-Unique: KEhnBH9HM4yrtAe4-uol9A-1 Received: by mail-wr1-f71.google.com with SMTP id e18-20020adfa452000000b00228a420c389so828218wra.16 for ; Tue, 20 Sep 2022 01:19:26 -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=5gk3kLlspQCYjPujhZljAtxcOT9dALJ6AajDjY8rEpQ=; b=eSfk4H0WerU4dB877YSeif3scxe7/GDyZvKbp0PY1D5i2Dy1wuucn5dNrR8hT9k5k7 mNtjsi328WZDMI3dmASxwn8up5HGQn3dE597BA2toE3IEaQvRHErH5TupZsUncHJ0J/L RqRomigY4+MknFdY5kMjL2BG/yUdEAAuiGXqDB9OtdvoC/AbUGQm8imTyRjln6gwK0vq c1s3YnMyvv3bgqmZHj6Rrod1HViNkBILqgwJbiPUmqYvqGid27B+oQ6g6QBULhUXnYDk drMgjCneRoR4HtTMB9NB7v+vWxGZ4Vvxly+APaYxVPDpH56IQKv1+AcGOiptLgD9tB4C xDKA== X-Gm-Message-State: ACrzQf2OWmtWdBZQJn2l1TQAHOi7PGSbGrUMmbgo/wJbZM7NveMyOG3F CDGIFG1tEV9w1JnmkuwYQogIH8HOu1sxJU7Vk12AqH5/sIp5A5QFFmXtJjFNPirSvOS2+vEX0b2 RhxTwOZqZM5CEOgRuJlnIZ/W9 X-Received: by 2002:a05:600c:5d3:b0:3b4:c326:d096 with SMTP id p19-20020a05600c05d300b003b4c326d096mr1455788wmd.98.1663661965720; Tue, 20 Sep 2022 01:19:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM699k74ssA2kGuvCCoIhZaRcQrvxVrQkbuqjTWhJzQr+8vhrPtqFiDe49El6iFxQE3O3R+O2w== X-Received: by 2002:a05:600c:5d3:b0:3b4:c326:d096 with SMTP id p19-20020a05600c05d300b003b4c326d096mr1455764wmd.98.1663661965297; Tue, 20 Sep 2022 01:19:25 -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 l9-20020a1ced09000000b003b49aa8083esm1325807wmh.42.2022.09.20.01.19.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 01:19:24 -0700 (PDT) Message-ID: Date: Tue, 20 Sep 2022 10:19:23 +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 3/3] debugfs: fix error when writing negative value to atomic_t 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-4-akinobu.mita@gmail.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220919172418.45257-4-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()"), so we have to use a 64-bit value to write a > negative value for a debugfs file created by debugfs_create_atomic_t(). Is that comment stale? I would ahve thought you simply document that we restore the original behavior essentially by reverting 005747526d4f ("docs: fault-injection: fix non-working usage of negative values") and the using DEFINE_DEBUGFS_ATTRIBUTE_SIGNED accordingly. > > This restores the previous behaviour by introducing > DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value. > > Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()") > Reported-by: Zhao Gongyi > Signed-off-by: Akinobu Mita Apart from that Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb