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 X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D21DCC38A2E for ; Thu, 16 Apr 2020 22:01:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 91526221F7 for ; Thu, 16 Apr 2020 22:01:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="uRHQGprX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91526221F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 117FB8E00E6; Thu, 16 Apr 2020 18:01:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ED15D8E00E5; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D72758E00E7; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0147.hostedemail.com [216.40.44.147]) by kanga.kvack.org (Postfix) with ESMTP id A458E8E00E5 for ; Thu, 16 Apr 2020 18:01:34 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 57BDF181AEF3E for ; Thu, 16 Apr 2020 22:01:34 +0000 (UTC) X-FDA: 76715090508.15.gold15_47dcf95e4df24 X-HE-Tag: gold15_47dcf95e4df24 X-Filterd-Recvd-Size: 3127 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 22:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=6nnPlD6yNmurx3gJbzRxQonr2FAcOIdGlhNqGMTRzlA=; b=uRHQGprXdszqvevb0pyd2gDUee 9jHxUj+A9+OjhbmwojSnIJjaKBeW8N3J9fA2XWwM2Y0KlVw1AYkPEX3DrGL5g9/8wHcjxAabn4Kf4 U3tfrHeDy4zlMGst6IoFp7WDhAFDfOpfYnlpAUrfnWmCZ8W5c6t5aUgvYzDuu3GCcWk5CjB1CKCcv 9lqaiCkObHdGjPeCU6NtAtpN4lz70CmVi0lZHSETeP+VhrHDSxFQuiSQoUHuCuXGgbgKQd2ObAe92 rVF79gaU7GD6fYZn3jpP540LeuHqm3AL02mWRNHB2dJTkladUA58sp0WbsvMHNfEGFRPG/T69D05r N1rbHYqg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPCZg-0003UZ-KC; Thu, 16 Apr 2020 22:01:32 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , William Kucharski Subject: [PATCH v3 07/11] mm: Remove definition of clear_bit_unlock_is_negative_byte Date: Thu, 16 Apr 2020 15:01:26 -0700 Message-Id: <20200416220130.13343-8-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200416220130.13343-1-willy@infradead.org> References: <20200416220130.13343-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Matthew Wilcox (Oracle)" All architectures now have a definition of clear_bit_unlock_is_negative_byte(), either their own or through asm-generic/bitops/lock.h Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski --- mm/filemap.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 23a051a7ef0f..e475117e89eb 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1248,29 +1248,6 @@ void add_page_wait_queue(struct page *page, wait_q= ueue_entry_t *waiter) } EXPORT_SYMBOL_GPL(add_page_wait_queue); =20 -#ifndef clear_bit_unlock_is_negative_byte - -/* - * PG_waiters is the high bit in the same byte as PG_lock. - * - * On x86 (and on many other architectures), we can clear PG_lock and - * test the sign bit at the same time. But if the architecture does - * not support that special operation, we just do this all by hand - * instead. - * - * The read of PG_waiters has to be after (or concurrently with) PG_lock= ed - * being cleared, but a memory barrier should be unneccssary since it is - * in the same byte as PG_locked. - */ -static inline bool clear_bit_unlock_is_negative_byte(long nr, volatile v= oid *mem) -{ - clear_bit_unlock(nr, mem); - /* smp_mb__after_atomic(); */ - return test_bit(PG_waiters, mem); -} - -#endif - /** * unlock_page - unlock a locked page * @page: the page --=20 2.25.1