From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B62916FF50; Thu, 2 May 2024 18:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714674258; cv=none; b=cCPNSfP89+VCdqGNyQdUqrQvcWb9xvTCOKvGh+4fiRouU+9eVWW47fBYKQLJlLr3pisPyKdlmU13X/GNdh/Nu/LHoz1fVVOg8CkW3Yt/xbkigptDKJa1njVLom6dLohVz8b43BYL9PtZ/eyAVPMSYXGVeWosh9E57C9n7YpySXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714674258; c=relaxed/simple; bh=ylWnqEAvyEPIc7SRwZTXG/C5/yblx7yHflIdhEkEBI8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QLbtTpKQzAACIIZpOD20FU5LzZRoSILdNjCK3fiMOHOZUZLKi9enPHQtQa6oH5F8bcXu4jwTEzt+cZALVSmFH5tyvCmHPXFSrFaf+/TEqiToUwwJTVaYctoGbg5zdBNF808mpoy5bVlEC/y8w7cWc7dH3dgOeKvUEIbwhpdn+WA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=Wks69KRw; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="Wks69KRw" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OItBiYM5ob5YgXgkQ6abRqbiUvcg7Ar2dwHm/F2y9hU=; b=Wks69KRwLVADkkQwyu3MAFQc+r 5l4UOtjB0kNAzHV2QkWq4viz2G1Wp4JXY87rMZbGKDBugzrb6BZAS6Zsl4i5wzQpg30FIT5UQ5v3W 6T1BF1ZUcftoesCK6MsqMY2dPLt0iGILpEhJlsdT2E19tgWlB6t62W7j1VBJC5zCK5wO80IrkrUcU X+fSTHaeSJ0FxE0L30QM3ekCFqtF9FZl5v92iteUosgih0w969rCrmdLAJOWNYbyWe66QG9BgT7IK lrHmj7aho3QeE/Ik8vdoySLcG9QxkD1dCN7bN6UfVoftP4v+e/LSpE3DdUYx1VOelvAIpNmqDa1m+ o4O/ss1g==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1s2b62-009dDH-3A; Thu, 02 May 2024 18:23:55 +0000 Date: Thu, 2 May 2024 19:23:54 +0100 From: Al Viro To: John Groves Cc: Jonathan Corbet , Jonathan Cameron , Dan Williams , Vishal Verma , Dave Jiang , Christian Brauner , Jan Kara , Matthew Wilcox , linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, John Groves , john@jagalactic.com, Dave Chinner , Christoph Hellwig , dave.hansen@linux.intel.com, gregory.price@memverge.com, Randy Dunlap , Jerome Glisse , Aravind Ramesh , Ajay Joshi , Eishan Mirakhur , Ravi Shankar , Srinivasulu Thanneeru , Luis Chamberlain , Amir Goldstein , Chandan Babu R , Bagas Sanjaya , "Darrick J . Wong" , Kent Overstreet , Steve French , Nathan Lynch , Michael Ellerman , Thomas Zimmermann , Julien Panis , Stanislav Fomichev , Dongsheng Yang Subject: Re: [RFC PATCH v2 08/12] famfs: module operations & fs_context Message-ID: <20240502182354.GH2118490@ZenIV> References: <86694a1a663ab0b6e8e35c7b187f5ad179103482.1714409084.git.john@groves.net> Precedence: bulk X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86694a1a663ab0b6e8e35c7b187f5ad179103482.1714409084.git.john@groves.net> Sender: Al Viro On Mon, Apr 29, 2024 at 12:04:24PM -0500, John Groves wrote: > + case S_IFREG: > + inode->i_op = NULL /* famfs_file_inode_operations */; > + inode->i_fop = NULL /* &famfs_file_operations */; Don't. We should never, ever store NULL in either. inode->i_op = &empty_iops; inode->i_fop = &no_open_fops; in inode_init_always() is there precisely to avoid doing that. IOW, the right thing would be something along the lines of /* inode->i_op = famfs_file_inode_operations */; if you want a placeholder for a patch later in the series - or simply /* methods will be set here in a commit or two */