From patchwork Sat Jan 12 05:54:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 10760897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2165B6C2 for ; Sat, 12 Jan 2019 05:55:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00A1E29AB8 for ; Sat, 12 Jan 2019 05:55:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E52AC29ABD; Sat, 12 Jan 2019 05:55:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F9DF29AB8 for ; Sat, 12 Jan 2019 05:55:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725820AbfALFyr (ORCPT ); Sat, 12 Jan 2019 00:54:47 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:47082 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbfALFyr (ORCPT ); Sat, 12 Jan 2019 00:54:47 -0500 Received: by mail-wr1-f67.google.com with SMTP id l9so17302682wrt.13; Fri, 11 Jan 2019 21:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EXdpAxMi+IjCkwtLHAcCwnnONOKeSMkg9N2RbHkuAjo=; b=sR3mXbm50Oxnk03Ekn5Y7pbMOqSjRwSdUOwQ0vzASi+buqFi6CULFwjEX/ipTD1iw1 Iwqh92LSzSE8erL/pj8S8NX0w2Ko84MJ6TNSUCeUhcMxyoaj0M+5EKKx+sLSsO5cuPAV 3nKef7QCc0POsuYxQYFKSwulnqLBGKfB6N5GMzGo9p1t5eVQEXexNPOAaRfSb7uWXXGr /ybR3/nGtvYuPawkKoweifx1ZgvaQrCmwGkmvlwhaF3o7lkdW49kN/ONupsy+/5dU6so gPIg/kVzqOhfHfCsE/+hgk8UzRhOeEHqA6GjtAZGleALSWTttOSBH5BL6aFsYNhUaBU0 3Eww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EXdpAxMi+IjCkwtLHAcCwnnONOKeSMkg9N2RbHkuAjo=; b=PQ2awEz/i5TcVoWja+IZ+PXS1LaRHT9H6Z1/bSLjIFWfPk2/E5unHkJbCA8rYbNJCL b56hx2kkbiZAcd3NUEMWTaKAbWUjDim0+xolGhoI5dDIzE+kVJEQ2ELVujS8bnptwQ8E u8hlKOfly7YvZMqlQf79Cch2F150se/n1O7Mlew4eHz5HK8Hx4NYd2wi7FZQyz1Y5vxH ESnc4EOLFTLd/Uz5pcaLozgJeTFWGHXMPCwJtVHsuvXqfnJsANxGWYtWzEIxd5mpNnJJ RGm8vYBxvMhI3wcdHRUSb4b1k/RAfyeWJXq2zvIS56zjieiPWgENpGT9cTuRyBWBLYAe xLRA== X-Gm-Message-State: AJcUukcKuwijCE6JTPXgeEOLw6Qe+RWeZ2H1Ft2cv5Hda34vWm+zwCJt 7KpCY/9ILJ+4eDxuhItk7kY= X-Google-Smtp-Source: ALg8bN5A4BWAl8Q3XXo3GqdH9QoRpSz0hG8rpU2HB7o1ByT8Dt8biREavO5GC9xFg3VN1l8hKf+8Ng== X-Received: by 2002:adf:f211:: with SMTP id p17mr16041874wro.293.1547272485337; Fri, 11 Jan 2019 21:54:45 -0800 (PST) Received: from felia.fritz.box ([2001:16b8:2d3c:9f00:9d02:40cb:9892:49cb]) by smtp.gmail.com with ESMTPSA id 124sm22989776wmh.22.2019.01.11.21.54.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jan 2019 21:54:44 -0800 (PST) From: Lukas Bulwahn To: Alexander Viro Cc: Elena Reshetova , Krystian Radlak , linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] fs: drop unused fput_atomic definition Date: Sat, 12 Jan 2019 06:54:30 +0100 Message-Id: <20190112055430.5860-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP commit d7065da03822 ("get rid of the magic around f_count in aio") added fput_atomic to include/linux/fs.h, motivated by its use in __aio_put_req() in fs/aio.c. Later, commit 3ffa3c0e3f6e ("aio: now fput() is OK from interrupt context; get rid of manual delayed __fput()") removed the only use of fput_atomic in __aio_put_req(), but did not remove the since then unused fput_atomic definition in include/linux/fs.h. We curate this now and finally remove the unused definition. This issue was identified during a code review due to a coccinelle warning from the atomic_as_refcounter.cocci rule pointing to the use of atomic_t in fput_atomic. Suggested-by: Krystian Radlak Signed-off-by: Lukas Bulwahn --- compile-tested with defconfig & allyesconfig on v4.20 include/linux/fs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 811c77743dad..ddf7de4d522b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -952,7 +952,6 @@ static inline struct file *get_file(struct file *f) return f; } #define get_file_rcu(x) atomic_long_inc_not_zero(&(x)->f_count) -#define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) #define file_count(x) atomic_long_read(&(x)->f_count) #define MAX_NON_LFS ((1UL<<31) - 1)