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]
Message-ID: <20090112011231.GA31971@fieldses.org>
Date:	Sun, 11 Jan 2009 20:12:31 -0500
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Qinghuang Feng <qhfeng.kernel@...il.com>
Cc:	linux-kernel@...r.kernel.org, neilb@...e.de,
	linux-nfs@...r.kernel.org
Subject: Re: [PATCH] NFSD: cleanup for nfs3proc.c

On Mon, Jan 12, 2009 at 03:13:53AM +0800, Qinghuang Feng wrote:
> MSDOS_SUPER_MAGIC is defined in <linux/magic.h>,
> so use MSDOS_SUPER_MAGIC directly.

Thanks.  But does anyone know if there's any better way to figure out
whether a filesystem supports links and symlinks than by checking
s_magic == MSDOS_SUPER_MAGIC??

--b.

> 
> Signed-off-by: Qinghuang Feng <qhfeng.kernel@...il.com>
> ---
> diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
> index 9dbd2eb..579ce8c 100644
> --- a/fs/nfsd/nfs3proc.c
> +++ b/fs/nfsd/nfs3proc.c
> @@ -18,6 +18,7 @@
>  #include <linux/unistd.h>
>  #include <linux/slab.h>
>  #include <linux/major.h>
> +#include <linux/magic.h>
>  
>  #include <linux/sunrpc/svc.h>
>  #include <linux/nfsd/nfsd.h>
> @@ -569,7 +570,7 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle    *argp,
>  		struct super_block *sb = argp->fh.fh_dentry->d_inode->i_sb;
>  
>  		/* Note that we don't care for remote fs's here */
> -		if (sb->s_magic == 0x4d44 /* MSDOS_SUPER_MAGIC */) {
> +		if (sb->s_magic == MSDOS_SUPER_MAGIC) {
>  			resp->f_properties = NFS3_FSF_BILLYBOY;
>  		}
>  		resp->f_maxfilesize = sb->s_maxbytes;
> @@ -610,7 +611,7 @@ nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle      *argp,
>  			resp->p_link_max = EXT2_LINK_MAX;
>  			resp->p_name_max = EXT2_NAME_LEN;
>  			break;
> -		case 0x4d44:	/* MSDOS_SUPER_MAGIC */
> +		case MSDOS_SUPER_MAGIC:
>  			resp->p_case_insensitive = 1;
>  			resp->p_case_preserving  = 0;
>  			break;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ