--- linux-2.6.5/fs/exportfs/expfs.c.nostale 2004-04-04 05:37:44.000000000 +0200 +++ linux-2.6.5/fs/exportfs/expfs.c 2004-04-30 10:32:19.000000000 +0200 @@ -278,7 +278,15 @@ /* drat - I just cannot find anything acceptable */ dput(result); - return ERR_PTR(-ESTALE); + + /* Originally, we would return ESTALE here. This is not + * correct, however, as the file handle is valid; it just + * failed our acceptance test. + * This will lead to unexpected results in the client if + * there are two processes accessing the same file; one + * with proper permissions and one without. + */ + return ERR_PTR(-EACCES); err_target: dput(target_dir);