Fixed building with backported AppArmor
This commit is contained in:
parent
3337d21439
commit
74577147bc
@ -327,6 +327,8 @@ static inline int is_vmalloc_or_module_addr(const void *x)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void kvfree(const void *addr);
|
||||
|
||||
static inline void compound_lock(struct page *page)
|
||||
{
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
|
@ -479,6 +479,15 @@ unsigned long vm_mmap(struct file *file, unsigned long addr,
|
||||
}
|
||||
EXPORT_SYMBOL(vm_mmap);
|
||||
|
||||
void kvfree(const void *addr)
|
||||
{
|
||||
if (is_vmalloc_addr(addr))
|
||||
vfree(addr);
|
||||
else
|
||||
kfree(addr);
|
||||
}
|
||||
EXPORT_SYMBOL(kvfree);
|
||||
|
||||
struct address_space *page_mapping(struct page *page)
|
||||
{
|
||||
struct address_space *mapping = page->mapping;
|
||||
|
@ -158,7 +158,7 @@ static int d_namespace_path(struct path *path, char *buf, char **name,
|
||||
* security_path hooks as a deleted dentry except without an inode
|
||||
* allocated.
|
||||
*/
|
||||
if (d_unlinked(path->dentry) && d_is_positive(path->dentry) &&
|
||||
if (d_unlinked(path->dentry) && path->dentry->d_inode &&
|
||||
!(flags & PATH_MEDIATE_DELETED)) {
|
||||
error = -ENOENT;
|
||||
goto out;
|
||||
|
Loading…
x
Reference in New Issue
Block a user