All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@osdl.org, linux-fsdevel@vger.kernel.org,
	linux-ext4@vger.kernel.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] ext2: conditional removal of NFSD code
Date: Sat, 6 Jan 2007 14:25:40 -0700	[thread overview]
Message-ID: <20070106212540.GJ24620@parisc-linux.org> (raw)
In-Reply-To: <20070106195830.GA6711@martell.zuzino.mipt.ru>

On Sat, Jan 06, 2007 at 10:58:31PM +0300, Alexey Dobriyan wrote:
> Nor me nor my box is going to act as NFS server, so ifdef all
> exporting code.

> @@ -916,7 +918,9 @@ static int ext2_fill_super(struct super_
>  	 * set up enough so that it can read an inode
>  	 */
>  	sb->s_op = &ext2_sops;
> +#if defined(CONFIG_EXPORTFS) || defined(CONFIG_EXPORTFS_MODULE)
>  	sb->s_export_op = &ext2_export_ops;
> +#endif

To avoid putting ifdefs within a function, how about adding:

#if defined(CONFIG_EXPORTFS) || defined(CONFIG_EXPORTFS_MODULE)
#define set_export_ops(sb, ops)		sb->s_export_op = ops
#else
#define set_export_ops(sb, ops)		0
#endif

That way you can get rid of the function pointer from the struct
superblock too.

But Dave Woodhouse is going to kill you for adding another
CONFIG_*_MODULE dependency.

  parent reply	other threads:[~2007-01-06 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-06 19:58 [PATCH] ext2: conditional removal of NFSD code Alexey Dobriyan
2007-01-06 20:16 ` Andrew Morton
2007-01-06 21:15   ` Alexey Dobriyan
2007-01-06 21:25 ` Matthew Wilcox [this message]
2007-01-06 21:44   ` Alexey Dobriyan
2007-01-06 21:52     ` Al Viro
2007-01-06 21:35 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070106212540.GJ24620@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.