Commit 9b62e934 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: return EACCES instead of ESTALE for certain filehandle lookup failures

As 'nfs_acceptable' uses the authnetication user in it's checks, the
filehandle might not be truely "stale" - EACCES is safer.

Thanks Olaf Kirch <okir@suse.de> and others.
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 bde785c2
......@@ -283,7 +283,12 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
/* drat - I just cannot find anything acceptable */
dput(result);
return ERR_PTR(-ESTALE);
/* It might be justifiable to return ESTALE here,
* but the filehandle at-least looks reasonable good
* and it just be a permission problem, so returning
* -EACCESS is safer
*/
return ERR_PTR(-EACCES);
err_target:
dput(target_dir);
......
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