diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-01 02:32:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-04 14:34:47 -0500 |
commit | 33c429405a2c8d9e42afb9fee88a63cfb2de1e98 (patch) | |
tree | d2ffe096cd36852049b844c8befd1ba0ba6cf18c /fs | |
parent | 6344c433a452b1a05d03a61a6a85d89f793bb7b8 (diff) |
copy address of proc_ns_ops into ns_common
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 1 | ||||
-rw-r--r-- | fs/proc/inode.c | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 30738d200866..f815218f92d3 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -2672,6 +2672,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns) | |||
2672 | kfree(new_ns); | 2672 | kfree(new_ns); |
2673 | return ERR_PTR(ret); | 2673 | return ERR_PTR(ret); |
2674 | } | 2674 | } |
2675 | new_ns->ns.ops = &mntns_operations; | ||
2675 | new_ns->seq = atomic64_add_return(1, &mnt_ns_seq); | 2676 | new_ns->seq = atomic64_add_return(1, &mnt_ns_seq); |
2676 | atomic_set(&new_ns->count, 1); | 2677 | atomic_set(&new_ns->count, 1); |
2677 | new_ns->root = NULL; | 2678 | new_ns->root = NULL; |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 43b703c6cd3b..a212996e0987 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -32,7 +32,6 @@ static void proc_evict_inode(struct inode *inode) | |||
32 | { | 32 | { |
33 | struct proc_dir_entry *de; | 33 | struct proc_dir_entry *de; |
34 | struct ctl_table_header *head; | 34 | struct ctl_table_header *head; |
35 | const struct proc_ns_operations *ns_ops; | ||
36 | struct ns_common *ns; | 35 | struct ns_common *ns; |
37 | 36 | ||
38 | truncate_inode_pages_final(&inode->i_data); | 37 | truncate_inode_pages_final(&inode->i_data); |
@@ -51,10 +50,9 @@ static void proc_evict_inode(struct inode *inode) | |||
51 | sysctl_head_put(head); | 50 | sysctl_head_put(head); |
52 | } | 51 | } |
53 | /* Release any associated namespace */ | 52 | /* Release any associated namespace */ |
54 | ns_ops = PROC_I(inode)->ns.ns_ops; | ||
55 | ns = PROC_I(inode)->ns.ns; | 53 | ns = PROC_I(inode)->ns.ns; |
56 | if (ns_ops && ns) | 54 | if (ns && ns->ops) |
57 | ns_ops->put(ns); | 55 | ns->ops->put(ns); |
58 | } | 56 | } |
59 | 57 | ||
60 | static struct kmem_cache * proc_inode_cachep; | 58 | static struct kmem_cache * proc_inode_cachep; |