From: "J. Bruce Fields" <bfields@fieldses.org>
To: Qinghuang Feng <qhfeng.kernel@gmail.com>
Cc: linux-kernel@vger.kernel.org, neilb@suse.de, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFSD: cleanup for nfs3proc.c
Date: Sun, 11 Jan 2009 20:12:31 -0500 [thread overview]
Message-ID: <20090112011231.GA31971@fieldses.org> (raw)
In-Reply-To: <496a44f7.05636e0a.69b8.6278@mx.google.com>
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@gmail.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;
>
next prev parent reply other threads:[~2009-01-12 1:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 19:13 [PATCH] NFSD: cleanup for nfs3proc.c Qinghuang Feng
2009-01-12 1:12 ` J. Bruce Fields [this message]
2009-01-12 8:03 ` Christoph Hellwig
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=20090112011231.GA31971@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=qhfeng.kernel@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox