From 6b61aed06a3b0eb8e8d49142ddd1e101a064444d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 14 Jul 2019 14:00:23 -0400 Subject: [PATCH] namei.h: get the comments on LOOKUP_... in sync with reality Signed-off-by: Al Viro --- include/linux/namei.h | 44 +++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/include/linux/namei.h b/include/linux/namei.h index ac665cbc659f..1a504fc7994f 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -16,37 +16,27 @@ enum { MAX_NESTED_LINKS = 8 }; */ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; -/* - * The bitmask for a lookup event: - * - follow links at the end - * - require a directory - * - ending slashes ok even for nonexistent files - * - internal "there are more path components" flag - * - dentry cache is untrusted; force a real lookup - * - suppress terminal automount - * - skip revalidation - */ -#define LOOKUP_FOLLOW 0x0001 -#define LOOKUP_DIRECTORY 0x0002 -#define LOOKUP_AUTOMOUNT 0x0004 - +/* pathwalk mode */ +#define LOOKUP_FOLLOW 0x0001 /* follow links at the end */ +#define LOOKUP_DIRECTORY 0x0002 /* require a directory */ +#define LOOKUP_AUTOMOUNT 0x0004 /* force terminal automount */ +#define LOOKUP_EMPTY 0x4000 /* accept empty path [user_... only] */ +#define LOOKUP_DOWN 0x8000 /* follow mounts in the starting point */ + +#define LOOKUP_REVAL 0x0020 /* tell ->d_revalidate() to trust no cache */ +#define LOOKUP_RCU 0x0040 /* RCU pathwalk mode; semi-internal */ + +/* These tell filesystem methods that we are dealing with the final component... */ +#define LOOKUP_OPEN 0x0100 /* ... in open */ +#define LOOKUP_CREATE 0x0200 /* ... in object creation */ +#define LOOKUP_EXCL 0x0400 /* ... in exclusive creation */ +#define LOOKUP_RENAME_TARGET 0x0800 /* ... in destination of rename() */ + +/* internal use only */ #define LOOKUP_PARENT 0x0010 -#define LOOKUP_REVAL 0x0020 -#define LOOKUP_RCU 0x0040 #define LOOKUP_NO_REVAL 0x0080 - -/* - * Intent data - */ -#define LOOKUP_OPEN 0x0100 -#define LOOKUP_CREATE 0x0200 -#define LOOKUP_EXCL 0x0400 -#define LOOKUP_RENAME_TARGET 0x0800 - #define LOOKUP_JUMPED 0x1000 #define LOOKUP_ROOT 0x2000 -#define LOOKUP_EMPTY 0x4000 -#define LOOKUP_DOWN 0x8000 extern int path_pts(struct path *path); -- 2.11.0