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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D568C5AE59 for ; Tue, 3 Jun 2025 14:28:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B508D6B0484; Tue, 3 Jun 2025 10:28:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B00196B0486; Tue, 3 Jun 2025 10:28:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A16606B0487; Tue, 3 Jun 2025 10:28:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 816326B0484 for ; Tue, 3 Jun 2025 10:28:49 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 432F1BD7D1 for ; Tue, 3 Jun 2025 14:28:49 +0000 (UTC) X-FDA: 83514320778.23.7CB8B3E Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf10.hostedemail.com (Postfix) with ESMTP id 924A1C000C for ; Tue, 3 Jun 2025 14:28:47 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of "SRS0=mph5=YS=goodmis.org=rostedt@kernel.org" designates 147.75.193.91 as permitted sender) smtp.mailfrom="SRS0=mph5=YS=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1748960927; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HWkvcWzDgBHpTsYPoU1d7anq/sb6OK5UPthnocSi/M0=; b=lym81v50yKkrlMmMBFPfLrdRX8uPgkwJBAtG3bD4c/P7bfH6qOqULl7N6r6VZwsKHdleuc pkhI3cvSSIenLaUWQSL4WAoJCEkJJko1ExN76zivfGTfIEmu9huMTxt6ckGITKwggoCTn8 Dt2WI2JCUXgBZybivccVgW1/H3hpZgg= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of "SRS0=mph5=YS=goodmis.org=rostedt@kernel.org" designates 147.75.193.91 as permitted sender) smtp.mailfrom="SRS0=mph5=YS=goodmis.org=rostedt@kernel.org"; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748960927; a=rsa-sha256; cv=none; b=IbCb9g35ZiYaBxU7+mXtu0THnF+LZLjHPwk7Y9JmgZR/+8zDYJpoK69ofsUG7tTPwj3Osk ZLNgNc1x8OrBhTANdq7leOWSMZhj7pARnB4BoVu+VgfdjvPFoTIrNec8ztINmS++qHYpE0 HodLHyyY7Hwt7pF7n1fgHh7CVn88CSA= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E6920A50363; Tue, 3 Jun 2025 14:28:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E196DC4CEED; Tue, 3 Jun 2025 14:28:45 +0000 (UTC) Date: Tue, 3 Jun 2025 10:29:59 -0400 From: Steven Rostedt To: Hugh Dickins Cc: Matthew Wilcox , LKML , linux-mm@kvack.org, Andrew Morton , Linus Torvalds Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set Message-ID: <20250603102959.20c85adb@gandalf.local.home> In-Reply-To: References: <20250602170500.48713a2b@gandalf.local.home> <20250602171458.7ceabb1c@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Stat-Signature: uzp8u87cbti3nc5qr7xm7g97sgxhaznd X-Rspamd-Queue-Id: 924A1C000C X-Rspamd-Server: rspam11 X-HE-Tag: 1748960927-787826 X-HE-Meta: U2FsdGVkX19w9tL1tCWvlmiEoK4uf8EISi9FDaRaKltkftrGJWa9F4cuzlKLvR1P3X0l8Jhsbj7xMYLUr5FPM8r3duuELEttx5c3XlEug2SLABciGGczgwp1mAg/UYJQDY8AFkkQO+1Hx3oETexvJ8K3NLNEB0uJOqbITG4xg9qw9JU4wlrj6tTjQGSbOsBkBW2kZ65b79SaW1LthpjPvU9OLzv+wFiyZzRZM9rmsMP3QVtejhiOBmFjpQpMsY1EqO4zqvF+QvtmMMZxx7OHVRg7nc/Q78w0d5yYERb01NJO43XlkvXRu5gNfXRG/rdIloKFFG5sF4PxlizZVZLeutXUKHw19EbgKKJLGw/p6Y7X6uo9wVVokXmBeGu+ZjOASA/qurHGDUd6ASESxhCPjztCmC3HteFlzWS/gvlTLtbWLsKSs+sxeqI50iIZbAZANdLLsQGtw9BLYazN/Z+YezLoCzW6xcMkT9ASMG0OxbQiHQsxtb/WL7bC2sQFRzs1cUTizDZ1ovdjRqkt4hxFlGFD2Q7UgmuEn4xktKLIHDq4x7uZF+V8/ZNT5HRP0JojiQAaAXMTUWpg5Cahwdr/W3qcRSIP11MTlANhTI5SPs2J9YKRDZJNAOhMmVfEek/SwuvCyEVV1UosGY6Wpmj7mKpj9kEa/lRuW2aWqJu/FBk9DnN2AD2Sl53h0UFFvdiFdQa956vTd/4NHi5szgY/p2gJe+rpkLFRiTXnhzK1JSvIXc+L0FMXkuljRR/U7Pb11dD2wA5w5X6uGQC2vMQc/swCW16AFEA+Mj+T+h1Cepx0BajOGxWqcGXolMgI6FYMhe9zvmEbfYh4nY3TVaAlQB4ijrqfJ1jE7AHevrbMcvXDka1dZPIr1HD1WUV4dDtBepzPMBmYKbtBXGkjoKKHG8i68ZkbvBQiCR/Osp/bzxcPIZLrpiDLS7SKMYFOC6EHjo0pJSvOQUNN9LCvYi8 c6oilR4h 5tMDsyrUEaayeHWyRfeUoONFtVcRljiefgNmTWMBImXE3kC9jem1wt3I+rtQOaxEg0Ut1F2a7a/vGtVCAiQUjqlv+mJISzWtsVhCMhXwJiJFlEaoXILma6zJCxSV8VGOWHUUkE9TL2SH6aBcQ6IjHAd9VB0wrnk+QnGhCt2gsnD5OlcvNmhv9JjjGXNP5xbjCSlPSxArYBi5lqPRL3I2yozXGWbRUEF4K+uRmSoMvgfojcw7VifNIQV0/GSmGN46goD/I1Bl1HhwTcDtmKAp4l6E/OmMq72LDzoZQ4ZHrFp3KHj3LsLPuu+bv8nXfJhRf62Zq 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: On Tue, 3 Jun 2025 01:02:36 -0700 (PDT) Hugh Dickins wrote: > Agreed that ramfs does not use swap, so calling swap_writepage() would > be weird. But, thanks for the build fix Steve, but it cannot be right > because return 0 says shmem_writeout() successfully sent the page to > swap, and that has unlocked the page (or soon will do so). It should > return an error (-ENXIO?), but I haven't checked what the callers do with Yeah, I figured it should return an error, but looking at the code I couldn't figure out what the proper error would be. Then I also noticed that the other stub functions just returned zero so I did the same. Perhaps add a WARN_ON_ONCE() if it is called without CONFIG_SHMEM configured? > that, nor whether they need the folio to be redirtied. And wouldn't it > need an EXPORT like the real one? Sorry, can't keep up, there are many > many things I should have looked at but have not... Tomorrow? Yeah, it probably needs an export as well. Note, if you come up with a solution, by all means use it and don't use my patch. I'm happy with a "Reported-by" and don't need to be the author. This is the "fix" I'm using so that I can test my code because without it, my tests fail. I'm also happy to send another update if it's simple. -- Steve