lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 7 Jan 2007 00:44:56 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Matthew Wilcox <matthew@....cx>
Cc:	akpm@...l.org, linux-fsdevel@...r.kernel.org,
	linux-ext4@...r.kernel.org, David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] ext2: conditional removal of NFSD code

On Sat, Jan 06, 2007 at 02:25:40PM -0700, Matthew Wilcox wrote:
> 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.

Exactly! I've just started with filesystems I use.

it should be wrapped in do {} while 0, of course.

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

I missed a flamewar on this topic?

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ