diff options
Diffstat (limited to 'include/linux/kernfs.h')
-rw-r--r-- | include/linux/kernfs.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index b0122dc6f96a..52bf5677db0b 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
@@ -50,7 +50,24 @@ enum kernfs_node_flag { | |||
50 | 50 | ||
51 | /* @flags for kernfs_create_root() */ | 51 | /* @flags for kernfs_create_root() */ |
52 | enum kernfs_root_flag { | 52 | enum kernfs_root_flag { |
53 | KERNFS_ROOT_CREATE_DEACTIVATED = 0x0001, | 53 | /* |
54 | * kernfs_nodes are created in the deactivated state and invisible. | ||
55 | * They require explicit kernfs_activate() to become visible. This | ||
56 | * can be used to make related nodes become visible atomically | ||
57 | * after all nodes are created successfully. | ||
58 | */ | ||
59 | KERNFS_ROOT_CREATE_DEACTIVATED = 0x0001, | ||
60 | |||
61 | /* | ||
62 | * For regular flies, if the opener has CAP_DAC_OVERRIDE, open(2) | ||
63 | * succeeds regardless of the RW permissions. sysfs had an extra | ||
64 | * layer of enforcement where open(2) fails with -EACCES regardless | ||
65 | * of CAP_DAC_OVERRIDE if the permission doesn't have the | ||
66 | * respective read or write access at all (none of S_IRUGO or | ||
67 | * S_IWUGO) or the respective operation isn't implemented. The | ||
68 | * following flag enables that behavior. | ||
69 | */ | ||
70 | KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK = 0x0002, | ||
54 | }; | 71 | }; |
55 | 72 | ||
56 | /* type-specific structures for kernfs_node union members */ | 73 | /* type-specific structures for kernfs_node union members */ |
@@ -280,8 +297,8 @@ void kernfs_notify(struct kernfs_node *kn); | |||
280 | 297 | ||
281 | const void *kernfs_super_ns(struct super_block *sb); | 298 | const void *kernfs_super_ns(struct super_block *sb); |
282 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 299 | struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
283 | struct kernfs_root *root, bool *new_sb_created, | 300 | struct kernfs_root *root, unsigned long magic, |
284 | const void *ns); | 301 | bool *new_sb_created, const void *ns); |
285 | void kernfs_kill_sb(struct super_block *sb); | 302 | void kernfs_kill_sb(struct super_block *sb); |
286 | 303 | ||
287 | void kernfs_init(void); | 304 | void kernfs_init(void); |
@@ -374,7 +391,8 @@ static inline const void *kernfs_super_ns(struct super_block *sb) | |||
374 | 391 | ||
375 | static inline struct dentry * | 392 | static inline struct dentry * |
376 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, | 393 | kernfs_mount_ns(struct file_system_type *fs_type, int flags, |
377 | struct kernfs_root *root, bool *new_sb_created, const void *ns) | 394 | struct kernfs_root *root, unsigned long magic, |
395 | bool *new_sb_created, const void *ns) | ||
378 | { return ERR_PTR(-ENOSYS); } | 396 | { return ERR_PTR(-ENOSYS); } |
379 | 397 | ||
380 | static inline void kernfs_kill_sb(struct super_block *sb) { } | 398 | static inline void kernfs_kill_sb(struct super_block *sb) { } |
@@ -432,9 +450,11 @@ static inline int kernfs_rename(struct kernfs_node *kn, | |||
432 | 450 | ||
433 | static inline struct dentry * | 451 | static inline struct dentry * |
434 | kernfs_mount(struct file_system_type *fs_type, int flags, | 452 | kernfs_mount(struct file_system_type *fs_type, int flags, |
435 | struct kernfs_root *root, bool *new_sb_created) | 453 | struct kernfs_root *root, unsigned long magic, |
454 | bool *new_sb_created) | ||
436 | { | 455 | { |
437 | return kernfs_mount_ns(fs_type, flags, root, new_sb_created, NULL); | 456 | return kernfs_mount_ns(fs_type, flags, root, |
457 | magic, new_sb_created, NULL); | ||
438 | } | 458 | } |
439 | 459 | ||
440 | #endif /* __LINUX_KERNFS_H */ | 460 | #endif /* __LINUX_KERNFS_H */ |