Commit ce1bad47 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: nfsd4: fix fileid in readdir responses

We were reporting mounted_on fileid instead of fileid in readdir responses.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 09b36144
...@@ -1800,7 +1800,7 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen, ...@@ -1800,7 +1800,7 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
*/ */
bmval0 = cd->rd_bmval[0]; bmval0 = cd->rd_bmval[0];
bmval1 = cd->rd_bmval[1]; bmval1 = cd->rd_bmval[1];
if ((bmval0 & ~(FATTR4_WORD0_RDATTR_ERROR | FATTR4_WORD0_FILEID)) || bmval1) { if ((bmval0 & ~(FATTR4_WORD0_RDATTR_ERROR)) || bmval1) {
/* /*
* "Heavyweight" case: we have no choice except to * "Heavyweight" case: we have no choice except to
* call nfsd4_encode_fattr(). * call nfsd4_encode_fattr().
...@@ -1876,8 +1876,6 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen, ...@@ -1876,8 +1876,6 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
attrlenp = p++; attrlenp = p++;
if (bmval0 & FATTR4_WORD0_RDATTR_ERROR) if (bmval0 & FATTR4_WORD0_RDATTR_ERROR)
*p++ = nfserr; /* no htonl */ *p++ = nfserr; /* no htonl */
if (bmval0 & FATTR4_WORD0_FILEID)
p = xdr_encode_hyper(p, (u64)ino);
*attrlenp = htonl((char *)p - (char *)attrlenp - 4); *attrlenp = htonl((char *)p - (char *)attrlenp - 4);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment