namei.h: get the comments on LOOKUP_... in sync with reality
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 14 Jul 2019 18:00:23 +0000 (14:00 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 31 Aug 2019 01:30:12 +0000 (21:30 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/namei.h

index ac665cbc659fda1a7da778e44548468adbfd3d7b..1a504fc7994f82500454a31c293c31df98af9ca9 100644 (file)
@@ -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);