mm: madvise allow remove operation for hugetlbfs
Now that we have hole punching support for hugetlbfs, we can also support the MADV_REMOVE interface to it. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Hugh Dickins <hughd@google.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
70c3547e36
Коммит
72079ba0df
|
@ -301,7 +301,7 @@ static long madvise_remove(struct vm_area_struct *vma,
|
|||
|
||||
*prev = NULL; /* tell sys_madvise we drop mmap_sem */
|
||||
|
||||
if (vma->vm_flags & (VM_LOCKED | VM_HUGETLB))
|
||||
if (vma->vm_flags & VM_LOCKED)
|
||||
return -EINVAL;
|
||||
|
||||
f = vma->vm_file;
|
||||
|
|
Загрузка…
Ссылка в новой задаче