Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

apparmor: remove unused functions in policy_ns.c/.h

These functions are not used now, remove them.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>

authored by

Xiu Jianfeng and committed by
John Johansen
fee5304a 5ebb39eb

-51
-14
security/apparmor/include/policy_ns.h
··· 86 86 void aa_free_ns(struct aa_ns *ns); 87 87 int aa_alloc_root_ns(void); 88 88 void aa_free_root_ns(void); 89 - void aa_free_ns_kref(struct kref *kref); 90 89 91 - struct aa_ns *aa_find_ns(struct aa_ns *root, const char *name); 92 - struct aa_ns *aa_findn_ns(struct aa_ns *root, const char *name, size_t n); 93 90 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n); 94 91 struct aa_ns *aa_lookupn_ns(struct aa_ns *view, const char *name, size_t n); 95 92 struct aa_ns *__aa_find_or_create_ns(struct aa_ns *parent, const char *name, ··· 146 149 const char *name) 147 150 { 148 151 return __aa_findn_ns(head, name, strlen(name)); 149 - } 150 - 151 - static inline struct aa_ns *__aa_lookup_ns(struct aa_ns *base, 152 - const char *hname) 153 - { 154 - return __aa_lookupn_ns(base, hname, strlen(hname)); 155 - } 156 - 157 - static inline struct aa_ns *aa_lookup_ns(struct aa_ns *view, const char *name) 158 - { 159 - return aa_lookupn_ns(view, name, strlen(name)); 160 152 } 161 153 162 154 #endif /* AA_NAMESPACE_H */
-37
security/apparmor/policy_ns.c
··· 160 160 } 161 161 162 162 /** 163 - * aa_findn_ns - look up a profile namespace on the namespace list 164 - * @root: namespace to search in (NOT NULL) 165 - * @name: name of namespace to find (NOT NULL) 166 - * @n: length of @name 167 - * 168 - * Returns: a refcounted namespace on the list, or NULL if no namespace 169 - * called @name exists. 170 - * 171 - * refcount released by caller 172 - */ 173 - struct aa_ns *aa_findn_ns(struct aa_ns *root, const char *name, size_t n) 174 - { 175 - struct aa_ns *ns = NULL; 176 - 177 - rcu_read_lock(); 178 - ns = aa_get_ns(__aa_findn_ns(&root->sub_ns, name, n)); 179 - rcu_read_unlock(); 180 - 181 - return ns; 182 - } 183 - 184 - /** 185 - * aa_find_ns - look up a profile namespace on the namespace list 186 - * @root: namespace to search in (NOT NULL) 187 - * @name: name of namespace to find (NOT NULL) 188 - * 189 - * Returns: a refcounted namespace on the list, or NULL if no namespace 190 - * called @name exists. 191 - * 192 - * refcount released by caller 193 - */ 194 - struct aa_ns *aa_find_ns(struct aa_ns *root, const char *name) 195 - { 196 - return aa_findn_ns(root, name, strlen(name)); 197 - } 198 - 199 - /** 200 163 * __aa_lookupn_ns - lookup the namespace matching @hname 201 164 * @view: namespace to search in (NOT NULL) 202 165 * @hname: hierarchical ns name (NOT NULL)