Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4963014img; Tue, 26 Mar 2019 22:19:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeL3wnLyK9jcPMX0mZg0D1B/5E01T+h0R2pUdwCM183ZPSy4qdCmVDpJVry20mt2eOVj1D X-Received: by 2002:a62:bd17:: with SMTP id a23mr32661630pff.233.1553663981481; Tue, 26 Mar 2019 22:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553663981; cv=none; d=google.com; s=arc-20160816; b=uVTSDT99uTxGIbil4tFQZo5ClXQ/ciqxlvXIR04bOdFdW/+S1WH27tVL8GDFkm7EeC BPhqsPfoO+UBMTB+bAO71c23wtSueLu7IgCW+Yr3fEChfGlEbX48foIzKb25i1al4+8V YnZA9n0Z5LjZnmweF+HRzBknFXszA40vl5tKBQtmHw+ritt6vHMlg/r5AcJMm8pYjvqA AUAh/1aYvXS0tkggI1ZKLCOmRtqR+GAKupo7PXTluuUvN/lUuSMLY/T4emcdr/lCex01 ANFZWr0AQ6YzoIwfJ1Qsos+S0cNgeSQCQ3lQhTQTZv7ALFDq1CVRcVlr2y5ajILC+MKf dSPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gqKWtylwm0gNw0hTdJOIxDNpCX0YdD/vmBdRDnc/fAE=; b=JUpUF/Xn8iAd/DwFcqzTzVI/bONWriPzTOwD1Q50k1rb9L7hYZLlwVlTzYe2BzV5rT Rb1tsTup4cDMOSa/qpzkEzCBL1FvhfnVSnew9eSIQYuRKaQ7LcPf4cNOrJ33Z9FBdpl2 5XcV5K2w7OBOFM+T+BEHKtwLRfVS4fp0Alz2oBV0Q9cPHy4XyOTcnd436ZYByFblk/I1 FK8FUc5dWT/y4nFH111EsBSNombEkp9zK2u2blw/dqdR2MXnb/h4kT+j5uM1CUNCxqjh mo2pYFsj2sX0sxbw4xIiD9Q9l6jJVDYJiAsg+HFe5aw1I3b875QTls5hq82M6ahLRgLM owng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=EBj+S0Wi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si17243024pgc.307.2019.03.26.22.19.26; Tue, 26 Mar 2019 22:19:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=EBj+S0Wi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732717AbfC0FSl (ORCPT + 99 others); Wed, 27 Mar 2019 01:18:41 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42137 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbfC0FSk (ORCPT ); Wed, 27 Mar 2019 01:18:40 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CE94E22165; Wed, 27 Mar 2019 01:18:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 27 Mar 2019 01:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=gqKWtylwm0gNw0hTdJOIxDNpCX0YdD/vmBdRDnc/fAE=; b=EBj+S0Wi zdB5dHaBPi59XvobYlwZAcBpwphkRTrDqapUYdzSO8x/A5ynGZVhnEZpzIl4h5hA lHESdx4G4bft/V0uvSmwW3gbmRKxq1KQUBRsWmdLWNff+oMz7RiKTFdW/fs39985 Sfj9NqIE3SdVVhqGwMivh4X7GXGMBGxyNcOW74lCt8JwR2FNhEhVY/w6G3kun04p HD+xNojFXHz1xaAaIuBbRzN/wxttgSs4UhR0VPgdPRR4bqBt6TxjjLtinqD2WCk5 J1uEPv35odGTR58NXh5qtVCtNfMg9PDSI1m2lx1OQiAi70Z8Af14U54VtnQrA6ff K29vnxFUkH10Vg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepfdfvohgsihhn ucevrdcujfgrrhguihhnghdfuceothhosghinheskhgvrhhnvghlrdhorhhgqeenucfkph epuddvgedrudeiledrudefledrudelvdenucfrrghrrghmpehmrghilhhfrhhomhepthho sghinheskhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgepfe X-ME-Proxy: Received: from eros.localdomain (124-169-139-192.dyn.iinet.net.au [124.169.139.192]) by mail.messagingengine.com (Postfix) with ESMTPA id 40857E415C; Wed, 27 Mar 2019 01:18:35 -0400 (EDT) From: "Tobin C. Harding" To: Al Viro Cc: "Tobin C. Harding" , Jonathan Corbet , Mauro Carvalho Chehab , Neil Brown , Randy Dunlap , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 04/24] fs: Add docstrings to exported functions Date: Wed, 27 Mar 2019 16:16:57 +1100 Message-Id: <20190327051717.23225-5-tobin@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190327051717.23225-1-tobin@kernel.org> References: <20190327051717.23225-1-tobin@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently exported docstrings for fs/file_table.c are included in Documentation/filesystems/api-summary.rst. This is a problem because there are no docstrings in file_table.c Add function docstrings for exported functions defined in fs/file_table.c Signed-off-by: Tobin C. Harding --- fs/file_table.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/fs/file_table.c b/fs/file_table.c index 5679e7fcb6b0..e3c6966c2d53 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -65,8 +65,8 @@ static long get_nr_files(void) return percpu_counter_read_positive(&nr_files); } -/* - * Return the maximum number of open files in the system +/** + * get_max_files() - Get the maximum number of open files in the system. */ unsigned long get_max_files(void) { @@ -178,8 +178,7 @@ struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred) } /** - * alloc_file - allocate and initialize a 'struct file' - * + * alloc_file() - Allocate and initialize a &struct file. * @path: the (dentry, vfsmount) pair for the new file * @flags: O_... flags with which the new file will be opened * @fop: the 'struct file_operations' for the new file @@ -210,6 +209,20 @@ static struct file *alloc_file(const struct path *path, int flags, return file; } +/** + * alloc_file_pseudo() - Allocate a pseudo file. + * @inode: The inode to fill in. + * @mnt: The vfsmount to use. + * @name: Name to used for newly allocated pseudo dentry. + * @flags: ``O_...`` flags with which the new file will be opened. + * @fops: fops for the new file. + * + * Allocate a pseudo dentry, fill in @inode information in the dentry + * (i.e. instantiate @inode). Create a &struct path from the dentry and + * @mnt. Allocate a &struct file from the newly created path. + * + * Return: The newly allocated file or -ENOMEM on error. + */ struct file *alloc_file_pseudo(struct inode *inode, struct vfsmount *mnt, const char *name, int flags, const struct file_operations *fops) -- 2.21.0