From patchwork Mon Nov 25 17:54:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 13885169 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8090D58D71 for ; Mon, 25 Nov 2024 17:54:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 598136B0085; Mon, 25 Nov 2024 12:54:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 549626B0088; Mon, 25 Nov 2024 12:54:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 437636B0089; Mon, 25 Nov 2024 12:54:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 25BCF6B0085 for ; Mon, 25 Nov 2024 12:54:56 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C1BF9806CD for ; Mon, 25 Nov 2024 17:54:55 +0000 (UTC) X-FDA: 82825368066.24.D9CB505 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP id 2CDCB80018 for ; Mon, 25 Nov 2024 17:54:46 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=GpWyo4pB; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732557292; a=rsa-sha256; cv=none; b=MNQQnmQWsBcQvAxAqkGsjurKeFMeorcPEkmRjhp1S1WWIuf4+vaHEddV4XmDT9c0g8YmJ7 pslJr1oi7Ccn6xOMM8gFdrqJWlp/V307G0X28tG5FTwUrzaBU0W3unQUz6zEvsuxpBegrv u6pJ8sGZ0gywxwMaqWcKL3XfnQ8Ox6M= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=GpWyo4pB; dmarc=none; spf=none (imf02.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732557292; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=ZW6YYzp0eBx4sJSL2cnvgiZmSCS5qBW8UyMy+qwIRLw=; b=z+1wvasP0ABfJqPKNC0DGDgRLfZfz98DDGLPG0ule0fuKBTyiqPOecKN8g0zI3+o0Em9Nx JJ9im3QcKe9Q7rgr2js84AddW/DnoY2Jgn0gMWH+ENf/kCHVkDP86XBwc3le/Tmy5A+dAv dmXsfnxgc3rj/Qphp1KlgQgieA2HW00= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=ZW6YYzp0eBx4sJSL2cnvgiZmSCS5qBW8UyMy+qwIRLw=; b=GpWyo4pBg7XDNBkSVM/FMl7owI tkSdgORTAovr09VRwiIsUGTOYeTsfEGymjH29HeppgYZh0JOvsm384wEGwsTTNxrlisywjCR/M6sG J7Pvb5cnAlTgYMyvhHTtXRuA9sN7Z6zxR3J/FZhFjK7sKn2oPNr0d9RsaxJk3X8hN77b4I8hUaHdS SQpjNpLqysL7y3MoDCJ/jP0FbTP+c51hYiMPqOtjYGD5qXu69A+2eaW3uWWX59UR4h4JF3inr2VhX h75omtqzJVyf1yD7OxBOXd8/T4Nm1rAwFWf9y0m8m0w/BAi0D1V7UuL9zNLIUm4/dg5o55u1lFc9V EqZT40jQ==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tFdIP-0000000CDUQ-2WDU; Mon, 25 Nov 2024 17:54:49 +0000 From: "Matthew Wilcox (Oracle)" To: David Howells Cc: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] watch_queue: Use page->private instead of page->index Date: Mon, 25 Nov 2024 17:54:41 +0000 Message-ID: <20241125175443.2911738-1-willy@infradead.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 2CDCB80018 X-Rspamd-Server: rspam11 X-Stat-Signature: 9nau775mmyatydttdeshyxsmd37m47zd X-HE-Tag: 1732557286-692343 X-HE-Meta: U2FsdGVkX1+2L6vTlrCLd3fSb2HCxAha0Xu3Mi1rjW/TxiB6Jq9b7rGqyzYJWxFqHvm8A1FgKxPNRNZELnLBROJ6PU6lj5DGTYETZfWQegfb96uZ34mNrm0fjQoXa4rIBZ8cg+o2MG88JT6ex2cXANCWk9qf+jKJceAuZoTJGK+10mTXFoPwz6yTHd3v8UuhUyiApE6oF0d5+vOc1xcIT4ANX7UEqg4b6iXGkwhxZGZ7xlzbuL0xdichyndFpOTYK5JIL8UhfxgLT7m65U1VhDCTSv7EXk51rMud4mQegwrqu6KRqqpWi0zL0YZDhTWRd1Q/Kxjd6P3UmfY7n+M0n7QRJRxDNOaFG16AXYuxbiduobz4BxjlKbz3kddVXw965APWBlRq8+GmSP+7B9rVckf5jXLHwsPyR3s/V/LXiQVzM5A4a8+HrqCwWBwfUfoL4pOjSjt6BIKGCcdUp9NHi0pIr3P29tXjlTHLdzT4a2LQOw97jL7xJzR3efAgXt5QcFQah0cAK5WvsrPT0NIPmU06mhFY4HQytN9yxGUOozT/CXL64i6F9ixHIDPFFIE6EX80OPxIHM3OClBA2GFCx8enkmfRBFKOAQC4Rt6I6nXtNviE52lKVwzyHJexfxtU0bF5cRogR9haIz+5RGC5wf9o5ltQoa9t6ENLkdmhKsSDkD4cIQZhrBw4y9MDjBaOrfq1MJjWPN/YelWRiq2Fdfbp0RR4w28Jvrf9AJMlNLnpebV0SUpryXNnA/6KtMto7N89E8CLnNrzxHxDHCFxWWfg5v3OKzbV7imNjq2jxpD8eHdBgpc1dUzY0qLXHPk/3eCc6Ms7BxP0MTyNxNLg3Yg2P766tiEjn1uY2nu6WkDIyFdSboVPliYtDuHMvVQCT/fRYcxrLAbJNKik22VQxMG/DHv7OJu9EFdsXpZJRfb9OAU2SU4Mmp1wssfZRTMY18V4p5qhnckU+FhktYl gmBaRR6S TOHvu8KIxhZlS/WlYScl+1ECFCz7tZTTnO7gAwarsPFTcwcrcK+9voWIBHpVQLT2P9z/Y4Ry2DffhpV7mCiDYYOavHQ4sMorogcut5V86cT628X6fNuHHNNmqYMB7jMbwsYfaN3gselX3dMm1Z1/sZ0sEDKSP4cfINiLJjy/KniNfOiHwp+LGcCEJ+FNwSXwiJItr/zCtgZllroFZLn8jysC9ovK2CqF6kbBJvoxWjG95KiAVXnXwU0mcTyt31iw0hljfqe9s3H26Pp7+ipcSwGXKpsnDpsKTfV6z 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: List-Subscribe: List-Unsubscribe: We are attempting to eliminate page->index, so use page->private instead. Signed-off-by: Matthew Wilcox (Oracle) --- kernel/watch_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/watch_queue.c b/kernel/watch_queue.c index 1895fbc32bcb..5267adeaa403 100644 --- a/kernel/watch_queue.c +++ b/kernel/watch_queue.c @@ -71,7 +71,7 @@ static void watch_queue_pipe_buf_release(struct pipe_inode_info *pipe, bit /= WATCH_QUEUE_NOTE_SIZE; page = buf->page; - bit += page->index; + bit += page->private; set_bit(bit, wqueue->notes_bitmap); generic_pipe_buf_release(pipe, buf); @@ -278,7 +278,7 @@ long watch_queue_set_size(struct pipe_inode_info *pipe, unsigned int nr_notes) pages[i] = alloc_page(GFP_KERNEL); if (!pages[i]) goto error_p; - pages[i]->index = i * WATCH_QUEUE_NOTES_PER_PAGE; + pages[i]->private = i * WATCH_QUEUE_NOTES_PER_PAGE; } bitmap = bitmap_alloc(nr_notes, GFP_KERNEL);