diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 13:21:59 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 13:21:59 -0400 |
| commit | 8dac6bee32425dd5145b40fa2307648cb7fb4d4a (patch) | |
| tree | b7165517729b755686f336b3066ebc982c8793ea /include/linux | |
| parent | f8f44f09eaa2bfb40651e7fc6054d65c8091499a (diff) | |
| parent | d6e43f751f252c68ca69fa6d18665d88d69ef8b7 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
AFS: Use i_generation not i_version for the vnode uniquifier
AFS: Set s_id in the superblock to the volume name
vfs: Fix data corruption after failed write in __block_write_begin()
afs: afs_fill_page reads too much, or wrong data
VFS: Fix vfsmount overput on simultaneous automount
fix wrong iput on d_inode introduced by e6bc45d65d
Delay struct net freeing while there's a sysfs instance refering to it
afs: fix sget() races, close leak on umount
ubifs: fix sget races
ubifs: split allocation of ubifs_info into a separate function
fix leak in proc_set_super()
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kobject_ns.h | 10 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 7 |
2 files changed, 6 insertions, 11 deletions
diff --git a/include/linux/kobject_ns.h b/include/linux/kobject_ns.h index 82cb5bf461fb..f66b065a8b5f 100644 --- a/include/linux/kobject_ns.h +++ b/include/linux/kobject_ns.h | |||
| @@ -32,15 +32,17 @@ enum kobj_ns_type { | |||
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | * Callbacks so sysfs can determine namespaces | 34 | * Callbacks so sysfs can determine namespaces |
| 35 | * @current_ns: return calling task's namespace | 35 | * @grab_current_ns: return a new reference to calling task's namespace |
| 36 | * @netlink_ns: return namespace to which a sock belongs (right?) | 36 | * @netlink_ns: return namespace to which a sock belongs (right?) |
| 37 | * @initial_ns: return the initial namespace (i.e. init_net_ns) | 37 | * @initial_ns: return the initial namespace (i.e. init_net_ns) |
| 38 | * @drop_ns: drops a reference to namespace | ||
| 38 | */ | 39 | */ |
| 39 | struct kobj_ns_type_operations { | 40 | struct kobj_ns_type_operations { |
| 40 | enum kobj_ns_type type; | 41 | enum kobj_ns_type type; |
| 41 | const void *(*current_ns)(void); | 42 | void *(*grab_current_ns)(void); |
| 42 | const void *(*netlink_ns)(struct sock *sk); | 43 | const void *(*netlink_ns)(struct sock *sk); |
| 43 | const void *(*initial_ns)(void); | 44 | const void *(*initial_ns)(void); |
| 45 | void (*drop_ns)(void *); | ||
| 44 | }; | 46 | }; |
| 45 | 47 | ||
| 46 | int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); | 48 | int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); |
| @@ -48,9 +50,9 @@ int kobj_ns_type_registered(enum kobj_ns_type type); | |||
| 48 | const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); | 50 | const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); |
| 49 | const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); | 51 | const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); |
| 50 | 52 | ||
| 51 | const void *kobj_ns_current(enum kobj_ns_type type); | 53 | void *kobj_ns_grab_current(enum kobj_ns_type type); |
| 52 | const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); | 54 | const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); |
| 53 | const void *kobj_ns_initial(enum kobj_ns_type type); | 55 | const void *kobj_ns_initial(enum kobj_ns_type type); |
| 54 | void kobj_ns_exit(enum kobj_ns_type type, const void *ns); | 56 | void kobj_ns_drop(enum kobj_ns_type type, void *ns); |
| 55 | 57 | ||
| 56 | #endif /* _LINUX_KOBJECT_NS_H */ | 58 | #endif /* _LINUX_KOBJECT_NS_H */ |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index c3acda60eee0..e2696d76a599 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -177,9 +177,6 @@ struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | |||
| 177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); | 177 | struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); |
| 178 | void sysfs_put(struct sysfs_dirent *sd); | 178 | void sysfs_put(struct sysfs_dirent *sd); |
| 179 | 179 | ||
| 180 | /* Called to clear a ns tag when it is no longer valid */ | ||
| 181 | void sysfs_exit_ns(enum kobj_ns_type type, const void *tag); | ||
| 182 | |||
| 183 | int __must_check sysfs_init(void); | 180 | int __must_check sysfs_init(void); |
| 184 | 181 | ||
| 185 | #else /* CONFIG_SYSFS */ | 182 | #else /* CONFIG_SYSFS */ |
| @@ -338,10 +335,6 @@ static inline void sysfs_put(struct sysfs_dirent *sd) | |||
| 338 | { | 335 | { |
| 339 | } | 336 | } |
| 340 | 337 | ||
| 341 | static inline void sysfs_exit_ns(int type, const void *tag) | ||
| 342 | { | ||
| 343 | } | ||
| 344 | |||
| 345 | static inline int __must_check sysfs_init(void) | 338 | static inline int __must_check sysfs_init(void) |
| 346 | { | 339 | { |
| 347 | return 0; | 340 | return 0; |
