From patchwork Fri May 23 12:55:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 4232541 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0A2D9BF90B for ; Fri, 23 May 2014 12:56:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28A16201B4 for ; Fri, 23 May 2014 12:56:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2974220170 for ; Fri, 23 May 2014 12:56:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752616AbaEWM4G (ORCPT ); Fri, 23 May 2014 08:56:06 -0400 Received: from mail-qc0-f175.google.com ([209.85.216.175]:58010 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbaEWM4E (ORCPT ); Fri, 23 May 2014 08:56:04 -0400 Received: by mail-qc0-f175.google.com with SMTP id w7so7959265qcr.6 for ; Fri, 23 May 2014 05:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=uZRWRRH7vnIStSqqriLxJKOxEAOBvG8tzpeiKPIBuAs=; b=0DKjhsYSz39VZpaVsaTS6KJlRIrvy8sXY3oDTdyAx4IZ8i/pJnGU4OiIkg108cDoMp ifjMuBD4fnqLvQGBWF3/XIlg88UJ8h7vQFUsu17mRJ+hOCkySkFp+n28orgMCM+iQoMT IQu0bx0WaVJjCLpf/eiXq/ShSV+xwrlMC5TtNT1mbF2Y/rAHk9Xoy3H5c93nbqRlkObX OpLpKxgRiNTDTB4+zR9z0JgG1b65oqosX0m6o/pZ0TwGAdHpjRELoSvnjLU+bPpExFXX ptOFBOfZhtTwlFqOdgyZw6srX7t48qN7GyW0nNW8KgfwIvH31hfGY7a5cJBLlEyh8tgS 4n/Q== X-Received: by 10.224.10.195 with SMTP id q3mr6147509qaq.65.1400849762763; Fri, 23 May 2014 05:56:02 -0700 (PDT) Received: from [192.168.31.158] ([118.117.113.227]) by mx.google.com with ESMTPSA id s8sm4760346qas.11.2014.05.23.05.55.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 05:56:02 -0700 (PDT) Message-ID: <537F454F.3080006@gmail.com> Date: Fri, 23 May 2014 20:55:43 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: Linux NFS Mailing List , kinglongmee@gmail.com Subject: [PATCH 4/5] NFSD: Remove typedef of svc_client and svc_export in export.c Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No need for a typedef wrapper for svc_export or svc_client, remove them. Signed-off-by: Kinglong Mee --- fs/nfsd/export.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 34cabab..39d15ce 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -23,9 +23,6 @@ #define NFSDDBG_FACILITY NFSDDBG_EXPORT -typedef struct auth_domain svc_client; -typedef struct svc_export svc_export; - /* * We have two caches. * One maps client+vfsmnt+dentry to export options - the export map @@ -795,7 +792,7 @@ svc_export_update(struct svc_export *new, struct svc_export *old) static struct svc_expkey * -exp_find_key(struct cache_detail *cd, svc_client *clp, int fsid_type, +exp_find_key(struct cache_detail *cd, struct auth_domain *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp) { struct svc_expkey key, *ek; @@ -817,9 +814,9 @@ exp_find_key(struct cache_detail *cd, svc_client *clp, int fsid_type, return ek; } - -static svc_export *exp_get_by_name(struct cache_detail *cd, svc_client *clp, - const struct path *path, struct cache_req *reqp) +static struct svc_export * +exp_get_by_name(struct cache_detail *cd, struct auth_domain *clp, + const struct path *path, struct cache_req *reqp) { struct svc_export *exp, key; int err; @@ -843,11 +840,11 @@ static svc_export *exp_get_by_name(struct cache_detail *cd, svc_client *clp, /* * Find the export entry for a given dentry. */ -static struct svc_export *exp_parent(struct cache_detail *cd, svc_client *clp, - struct path *path) +static struct svc_export * +exp_parent(struct cache_detail *cd, struct auth_domain *clp, struct path *path) { struct dentry *saved = dget(path->dentry); - svc_export *exp = exp_get_by_name(cd, clp, path, NULL); + struct svc_export *exp = exp_get_by_name(cd, clp, path, NULL); while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) { struct dentry *parent = dget_parent(path->dentry); @@ -868,7 +865,7 @@ static struct svc_export *exp_parent(struct cache_detail *cd, svc_client *clp, * since its harder to fool a kernel module than a user space program. */ int -exp_rootfh(struct net *net, svc_client *clp, char *name, +exp_rootfh(struct net *net, struct auth_domain *clp, char *name, struct knfsd_fh *f, int maxsize) { struct svc_export *exp;