Message ID | 20240126132903.2700077-4-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 859DFC47DDF for <linux-mm@archiver.kernel.org>; Fri, 26 Jan 2024 13:29:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 142B86B007B; Fri, 26 Jan 2024 08:29:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A2D06B0080; Fri, 26 Jan 2024 08:29:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED6596B0081; Fri, 26 Jan 2024 08:29:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D4F796B007B for <linux-mm@kvack.org>; Fri, 26 Jan 2024 08:29:23 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A4723A2688 for <linux-mm@kvack.org>; Fri, 26 Jan 2024 13:29:23 +0000 (UTC) X-FDA: 81721543806.10.9271324 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf10.hostedemail.com (Postfix) with ESMTP id E3111C001E for <linux-mm@kvack.org>; Fri, 26 Jan 2024 13:29:21 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=mQKrs4ng; spf=none (imf10.hostedemail.com: domain of BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706275761; 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:in-reply-to:references:references:dkim-signature; bh=Ai62sSrlh2/pqyKEZx0ovGIMBLUhqMYLKAXhWcyLh60=; b=gtGBj0Nf3aQ2LKztC/LtgVI59SyMfp50DOULxegQraX7sOx8rLpHoM+cDax+wSzTCJjrVK fdstE95Z1TUOSHHICH7uIAnpjypo9Rk7nspFOwh3eOhdpzwa+QlcGAmoIjWT6AKNC6yo2p /+3mtPn1idHj3MUfQIJo8Jtnir/y2f0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706275762; a=rsa-sha256; cv=none; b=WHQRSYB661g0m/nH+HeMNqjh4l4ZrqCJeTq4FZqlJGB+A+rEvWrFxfEdbu/h4q4mHKlG9w JCR53WGJ+WI3xCk41ZfUd9FY9pLvKhhWdYWAWHMR0SoZM9gpQqhma4yvbvMdwKSl1UdyDo qaLFknyKU37PLVZLdGjHzCUdM/X217o= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=mQKrs4ng; spf=none (imf10.hostedemail.com: domain of BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=Ai62sSrlh2/pqyKEZx0ovGIMBLUhqMYLKAXhWcyLh60=; b=mQKrs4ngo4qu6BMNq52g3Xoh7/ O1zh9BQRalb2rgsldg+P4cm3P79MSZ374U5u2xMs9aaCXSTKGh03bTGb/fEr3qiMyn8guEcmy+SRw JHIN6C8IUSYHKbj2Es1IUtbK5021qHQt+HfO7TM71CzncgPPbJt7BWwm/rZtDZAM7uumax6KLUJ6G ghdizB1jiJ3qdlvd0MqYA3bxJufSlmzYMLnhqB9xerL7YZP7mRcNamDKWenB/tltXQ14lteiYxVHx AWFrf20QD1Np/CHZ+sEpXUp1sShnsCrrSaPHyLxPfA4KaCH1MKn+lzrpxVLgTrH1CiMDOwTHL1g41 DcUeU/mA==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTMGk-00000004CbH-2wFk; Fri, 26 Jan 2024 13:29:19 +0000 From: Christoph Hellwig <hch@lst.de> To: Chandan Babu R <chandan.babu@oracle.com>, "Darrick J. Wong" <djwong@kernel.org>, Hugh Dickins <hughd@google.com>, Andrew Morton <akpm@linux-foundation.org> Cc: linux-xfs@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 03/21] shmem: set a_ops earlier in shmem_symlink Date: Fri, 26 Jan 2024 14:28:45 +0100 Message-Id: <20240126132903.2700077-4-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240126132903.2700077-1-hch@lst.de> References: <20240126132903.2700077-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: E3111C001E X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: u9fsh7jbzipz979uwgzqop5xaij3ii1q X-HE-Tag: 1706275761-982887 X-HE-Meta: U2FsdGVkX19fR9Ulqw9qd1v1BGB6J7bVJ0NL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UAVcZ0IgymEtCJKYqwPujtyO0Ay2JMwnCZf8WN2vTVBWBoNbdZ2/KLsYB9R99TMc6RuMVo+TPRUbWE1Rw5ZThEDwblbl1fCkexamubdpiNSq+KtjULBIwrHk/0sW9X7s3Y9IGafPPVBz8hTytwHbACTDQ569+HntCqlvZg5TkOU3lvPMMdaZGYhVFpM7oCchIf0MX7qACz7c+uAj/n6hjnRy/Uc5fXRdJrTc/y+PrgLB2zyFB7p75ex05nVD2uTr2+wh2gxLMahvHv1tWIxkPHv0MHpnF7Og0rCwwOawnjranxgWdDe7ADPk2r9jX9sBr5oaYyr95t81AVxLwQPlh6M= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[01/21] mm: move mapping_set_update out of <linux/swap.h>
|
expand
|
On Fri, Jan 26, 2024 at 02:28:45PM +0100, Christoph Hellwig wrote: > Set the a_aops in shmem_symlink before reading a folio from the mapping s/a_aops/a_ops/ > to prepare for asserting that shmem_get_folio is only called on shmem > mappings. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
diff --git a/mm/shmem.c b/mm/shmem.c index f607b0cab7e4e2..1900916aa84d13 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3506,10 +3506,10 @@ static int shmem_symlink(struct mnt_idmap *idmap, struct inode *dir, inode->i_op = &shmem_short_symlink_operations; } else { inode_nohighmem(inode); + inode->i_mapping->a_ops = &shmem_aops; error = shmem_get_folio(inode, 0, &folio, SGP_WRITE); if (error) goto out_remove_offset; - inode->i_mapping->a_ops = &shmem_aops; inode->i_op = &shmem_symlink_inode_operations; memcpy(folio_address(folio), symname, len); folio_mark_uptodate(folio);
Set the a_aops in shmem_symlink before reading a folio from the mapping to prepare for asserting that shmem_get_folio is only called on shmem mappings. Signed-off-by: Christoph Hellwig <hch@lst.de> --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)