From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: + knfsd-exportfs-add-exportfsh-header-fix.patch added to -mm tree Date: Wed, 16 May 2007 08:57:21 +0200 Message-ID: <20070516065721.GA9884@lst.de> References: <200705152152.l4FLqJsV018874@shell0.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, hch@infradead.org, hch@lst.de, neilb@suse.de, sfrench@us.ibm.com To: akpm@linux-foundation.org Return-path: Received: from verein.lst.de ([213.95.11.210]:33098 "EHLO mail.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752449AbXEPG6R (ORCPT ); Wed, 16 May 2007 02:58:17 -0400 Content-Disposition: inline In-Reply-To: <200705152152.l4FLqJsV018874@shell0.pdx.osdl.net> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, May 15, 2007 at 02:49:14PM -0700, akpm@linux-foundation.org wrote: > fs/cifs/export.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff -puN fs/cifs/export.c~knfsd-exportfs-add-exportfsh-header-fix fs/cifs/export.c > --- a/fs/cifs/export.c~knfsd-exportfs-add-exportfsh-header-fix > +++ a/fs/cifs/export.c > @@ -29,7 +29,8 @@ > */ > > #include > - > +#include > + > #ifdef CONFIG_CIFS_EXPERIMENTAL Looks like cifs has grown and export_operations table since I did the patch. But with only a get_parent method that returns and error it's not useful at all, so we should rather remove the whole file: Signed-off-by: Christoph Hellwig Index: linux-2.6/fs/cifs/cifsfs.c =================================================================== --- linux-2.6.orig/fs/cifs/cifsfs.c 2007-05-16 07:55:35.000000000 +0200 +++ linux-2.6/fs/cifs/cifsfs.c 2007-05-16 07:55:50.000000000 +0200 @@ -49,10 +49,6 @@ static struct quotactl_ops cifs_quotactl_ops; #endif /* QUOTA */ -#ifdef CONFIG_CIFS_EXPERIMENTAL -extern struct export_operations cifs_export_ops; -#endif /* EXPERIMENTAL */ - int cifsFYI = 0; int cifsERROR = 1; int traceSMB = 0; @@ -114,10 +110,6 @@ cifs_read_super(struct super_block *sb, sb->s_magic = CIFS_MAGIC_NUMBER; sb->s_op = &cifs_super_ops; -#ifdef CONFIG_CIFS_EXPERIMENTAL - if (experimEnabled != 0) - sb->s_export_op = &cifs_export_ops; -#endif /* EXPERIMENTAL */ /* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512) sb->s_blocksize = cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */ #ifdef CONFIG_CIFS_QUOTA Index: linux-2.6/fs/cifs/export.c =================================================================== --- linux-2.6.orig/fs/cifs/export.c 2007-05-16 07:55:59.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * fs/cifs/export.c - * - * Copyright (C) International Business Machines Corp., 2007 - * Author(s): Steve French (sfrench@us.ibm.com) - * - * Common Internet FileSystem (CIFS) client - * - * Operations related to support for exporting files via NFSD - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - * the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - /* - * See Documentation/filesystems/Exporting - * and examples in fs/exportfs - */ - -#include - -#ifdef CONFIG_CIFS_EXPERIMENTAL - -static struct dentry *cifs_get_parent(struct dentry *dentry) -{ - /* BB need to add code here eventually to enable export via NFSD */ - return ERR_PTR(-EACCES); -} - -struct export_operations cifs_export_ops = { - .get_parent = cifs_get_parent, -/* Following five export operations are unneeded so far and can default */ -/* .get_dentry = - .get_name = - .find_exported_dentry = - .decode_fh = - .encode_fs = */ - }; - -#endif /* EXPERIMENTAL */ -