Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2660885pxb; Tue, 9 Mar 2021 07:56:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAcxf802RyzmeerbIwiayI0L+cYVqca1tx2wPj19OO9WzKxloLKlBCs3jv/Fx4BI9bpKi4 X-Received: by 2002:a05:6402:510f:: with SMTP id m15mr4971556edd.328.1615305394705; Tue, 09 Mar 2021 07:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615305394; cv=none; d=google.com; s=arc-20160816; b=VurVz5m1HCv3l5LcyiXxKRxLGHG9uEYIy9HAwigik5FiITYUI6x8rZ91cAsA4yrjpT pH0UhxG/9o7jEnavkSJlmy0Smj3JkOq76YmnU3f7nS1zslO+0giqb+HomcuFVGRHa3l6 PoZKqfG+jzZ5nc0FmoasHODm+dDR+buCJnMEWB/FgI5J4SpDnrVPk6keFOneQtnFLxOI XsnRir9DTwCl0vu3u4eklpGZ+bfVHjz9jISJHs4Ra5NqCjmbGr+KDyABZNqlAGcKdDDr mIKP0kOvcMzbOtxPkFx+80E0bzNZfaGEq07F70+MDAO9P5xbSjhCJgcHrwKoSn+DHndi XKSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=KGWSD1qzjw8jWYcVTd5k5Vux/eD/dPBH9TiN6yLVseE=; b=HGYGFcm5mGci9kWB0RtqQqLMB0CUYduE/Nz6h0McTKILGr44fo5M+xvqMIDDX+i5nK kJ8ZSHebsK4IFeHv9pWsCHtQHh85z3em52byohF02Q0iH1TcRyUUWJc3QPOejxif49xq 7CXVAs1yd0oZ60ZqDCRN1CttslnwNBxAPXHZcKSdJNjRM6+LaE61F/+lghukRYaZSZlH +aCEoVSEal9Wd+Q2loOSMGgYqiyiwbd+8Y4phsySN9uuklUF5l3+bwj+w3f7Gnhk2fl9 7M+bH4+e78f6o/Da7n74y+GlAwG9MKbASwd8easy+wNeHkHfD80XtzB4Ddx1MwJZxIOA Dd+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UqioM+JO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si9483791ejh.440.2021.03.09.07.56.11; Tue, 09 Mar 2021 07:56:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UqioM+JO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbhCIPzP (ORCPT + 99 others); Tue, 9 Mar 2021 10:55:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbhCIPyr (ORCPT ); Tue, 9 Mar 2021 10:54:47 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5077C06175F; Tue, 9 Mar 2021 07:54:46 -0800 (PST) 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=KGWSD1qzjw8jWYcVTd5k5Vux/eD/dPBH9TiN6yLVseE=; b=UqioM+JOtMrCZY+99WNlohS+n6 D8sXLpSvt07nrEhE9GYHmdMTmjw4DL1jAclk+Ci+jnYGdn+IEIwZ0S8fpKJ2whNwkyjmljxBPh47g cMsKfNPA0fujb0XrwseHmDs/2m816gk63sTddN9x9X9wgRohgavTvx8tm6KQtpAyIG7cxz0OK5MKP PgIH6/WtutbbPjhpmXZVF7C1m9jWVkHGrdDIIbgcgrxaJ3JqKKlPb7/Swf8vZxBO2cCE67ILF7rVn MmRlVgFU4oQqmQ/DBvwu33p+M9TPPMt61GrQMTQJl2w3aFf67m+MltPsTuxfefjtilLeB/ZfnOnxB lkLQIpmA==; Received: from [2001:4bb8:180:9884:c70:4a89:bc61:3] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lJegA-000lLy-1I; Tue, 09 Mar 2021 15:53:56 +0000 From: Christoph Hellwig To: Al Viro Cc: Andrew Morton , Daniel Vetter , Nadav Amit , "VMware, Inc." , "Michael S. Tsirkin" , David Hildenbrand , Minchan Kim , Nitin Gupta , Jason Gunthorpe , Alex Williamson , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: make alloc_anon_inode more useful Date: Tue, 9 Mar 2021 16:53:39 +0100 Message-Id: <20210309155348.974875-1-hch@lst.de> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, this series first renames the existing alloc_anon_inode to alloc_anon_inode_sb to clearly mark it as requiring a superblock. It then adds a new alloc_anon_inode that works on the anon_inode file system super block, thus removing tons of boilerplate code. The few remainig callers of alloc_anon_inode_sb all use alloc_file_pseudo later, but might also be ripe for some cleanup. Diffstat: arch/powerpc/platforms/pseries/cmm.c | 27 +------------- drivers/dma-buf/dma-buf.c | 2 - drivers/gpu/drm/drm_drv.c | 64 +---------------------------------- drivers/misc/cxl/api.c | 2 - drivers/misc/vmw_balloon.c | 24 +------------ drivers/scsi/cxlflash/ocxl_hw.c | 2 - drivers/virtio/virtio_balloon.c | 30 +--------------- fs/aio.c | 2 - fs/anon_inodes.c | 15 +++++++- fs/libfs.c | 2 - include/linux/anon_inodes.h | 1 include/linux/fs.h | 2 - kernel/resource.c | 30 ++-------------- mm/z3fold.c | 38 +------------------- mm/zsmalloc.c | 48 +------------------------- 15 files changed, 39 insertions(+), 250 deletions(-)