diff mbox series

[2/3] export: add EACCES to the list of known path_lookup_error() errors.

Message ID 20231011051131.24667-3-neilb@suse.de (mailing list archive)
State New, archived
Headers show
Series fixes for error handling in nfsd_fh | expand

Commit Message

NeilBrown Oct. 11, 2023, 4:58 a.m. UTC
If a 'stat' results in EACCES (for root), then it is likely a permanent
problem.  One possible cause is a 'fuser' filesystem which only gives
any access to the user which mounted it.

So it is reasonable for EACCES to be a "path lookup error"

Signed-off-by: NeilBrown <neilb@suse.de>
---
 support/export/cache.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/support/export/cache.c b/support/export/cache.c
index e4595020f43f..5307f6c8d872 100644
--- a/support/export/cache.c
+++ b/support/export/cache.c
@@ -77,6 +77,7 @@  static bool path_lookup_error(int err)
 	case ENAMETOOLONG:
 	case ENOENT:
 	case ENOTDIR:
+	case EACCES:
 		return 1;
 	}
 	return 0;