LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: "Oliver Pinter (Pintér Olivér)" <oliver.pntr@gmail.com> To: "Linux Kernel" <linux-kernel@vger.kernel.org>, stable@kernel.org, stable-commits@vger.kernel.org Cc: "chrisw@sous-sol.org" <chrisw@sous-sol.org>, "Greg KH" <gregkh@suse.de>, "Willy Tarreau" <w@1wt.eu>, "Adrian Bunk" <bunk@kernel.org>, "Andreas Gruenbacher" <agruen@suse.de>, "J. Bruce Fields" <bfields@citi.umich.edu> Subject: [2.6.22.y] {16/17} - nfsv4-MAXNAME-fix.diff - series for stable kernel #2 Date: Sat, 2 Feb 2008 02:34:41 +0100 [thread overview] Message-ID: <6101e8c40802011734t235bc7j88a5f3fb6227aaf4@mail.gmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 72 bytes --] mainline: a16e92edcd0a2846455a30823e1bac964e743baa -- Thanks, Oliver [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: nfsv4-MAXNAME-fix.diff --] [-- Type: text/x-diff; name=nfsv4-MAXNAME-fix.diff, Size: 1250 bytes --] From: J. Bruce Fields <bfields@citi.umich.edu> Date: Fri, 28 Sep 2007 16:45:51 -0400 Subject: knfsd: query filesystem for NFSv4 getattr of FATTR4_MAXNAME References: 271803 Patch-mainline: 2.6.24 (likely) Without this we always return 2^32-1 as the the maximum namelength. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Andreas Gruenbacher <agruen@suse.de> --- fs/nfsd/nfs4xdr.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) --- linux-2.6.22.orig/fs/nfsd/nfs4xdr.c +++ linux-2.6.22/fs/nfsd/nfs4xdr.c @@ -1453,7 +1453,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s err = vfs_getattr(exp->ex_mnt, dentry, &stat); if (err) goto out_nfserr; - if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL)) || + if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL | + FATTR4_WORD0_MAXNAME)) || (bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL))) { err = vfs_statfs(dentry, &statfs); @@ -1699,7 +1700,7 @@ out_acl: if (bmval0 & FATTR4_WORD0_MAXNAME) { if ((buflen -= 4) < 0) goto out_resource; - WRITE32(~(u32) 0); + WRITE32(statfs.f_namelen); } if (bmval0 & FATTR4_WORD0_MAXREAD) { if ((buflen -= 8) < 0)
next reply other threads:[~2008-02-02 1:39 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-02-02 1:34 Oliver Pinter (Pintér Olivér) [this message] 2008-02-06 23:03 ` [2.6.22.y] {16/17} - nfsv4-MAXNAME-fix.diff - series for stable kernel #2 Oliver Pinter
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=6101e8c40802011734t235bc7j88a5f3fb6227aaf4@mail.gmail.com \ --to=oliver.pntr@gmail.com \ --cc=agruen@suse.de \ --cc=bfields@citi.umich.edu \ --cc=bunk@kernel.org \ --cc=chrisw@sous-sol.org \ --cc=gregkh@suse.de \ --cc=linux-kernel@vger.kernel.org \ --cc=stable-commits@vger.kernel.org \ --cc=stable@kernel.org \ --cc=w@1wt.eu \ /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: linkBe 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; as well as URLs for NNTP newsgroup(s).