Skip to content

Commit

Permalink
knfsd: fix spurious EINVAL errors on first access of new filesystem
Browse files Browse the repository at this point in the history
The v2/v3 acl code in nfsd is translating any return from fh_verify() to
nfserr_inval.  This is particularly unfortunate in the case of an
nfserr_dropit return, which is an internal error meant to indicate to
callers that this request has been deferred and should just be dropped
pending the results of an upcall to mountd.

Thanks to Roland <[email protected]> for bug report and data collection.

Cc: Roland <[email protected]>
Acked-by: Andreas Gruenbacher <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Reviewed-By: NeilBrown <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Nov 12, 2007
1 parent 44048d7 commit ac8587d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs2acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp,

fh = fh_copy(&resp->fh, &argp->fh);
if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP)))
RETURN_STATUS(nfserr_inval);
RETURN_STATUS(nfserr);

if (argp->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT))
RETURN_STATUS(nfserr_inval);
Expand Down
2 changes: 1 addition & 1 deletion fs/nfsd/nfs3acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp,

fh = fh_copy(&resp->fh, &argp->fh);
if ((nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP)))
RETURN_STATUS(nfserr_inval);
RETURN_STATUS(nfserr);

if (argp->mask & ~(NFS_ACL|NFS_ACLCNT|NFS_DFACL|NFS_DFACLCNT))
RETURN_STATUS(nfserr_inval);
Expand Down

0 comments on commit ac8587d

Please sign in to comment.