Thread (8 messages) 8 messages, 2 authors, 2023-10-25
STALE965d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

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

From: NeilBrown <hidden>
Date: 2023-10-23 02:11:50
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 support/export/cache.c | 1 +
 1 file changed, 1 insertion(+)
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;
-- 
2.42.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help