On Mon, Jan 27, 2020 at 08:38:00PM +0200, Amir Goldstein wrote: > > > Commit 909e22e05353 ("exportfs: fix 'passing zero to ERR_PTR()' > > > warning") changes this behavior from always returning success, > > > regardless if dentry was reconnected by somoe other task, to always > > > returning a failure. > > > > I wonder whether it might be safest to take the out_reconnected case on > > any error, not just -ENOENT. > > > > I wondered that as well, but preferred to follow the precedent. I can live with that. > > There's not much value in preserving the error as exportfs_decode_fh() > > ends up turning everything into ENOMEM or ESTALE for some reason. > > > > You signed up on this reason... Hah, I forgot that one. --b. > > Thanks, > Amir. > > commit 09bb8bfffd29c3dffb72bc2c69a062dfb1ae624c > Author: NeilBrown <neilb@xxxxxxxx> > Date: Thu Aug 4 10:19:06 2016 +1000 > > exportfs: be careful to only return expected errors. > > When nfsd calls fh_to_dentry, it expect ESTALE or ENOMEM as errors. > In particular it can be tempting to return ENOENT, but this is not > handled well by nfsd. > > Rather than requiring strict adherence to error code code filesystems, > treat all unexpected error codes the same as ESTALE. This is safest. > > Signed-off-by: NeilBrown <neilb@xxxxxxxx> > Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> >