Skip to content

Commit 1f704fd

Browse files
tititiou36torvalds
authored andcommitted
mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()'
A semaphore is acquired before this check, so we must release it before leaving. Link: http://lkml.kernel.org/r/[email protected] Fixes: b7f0554 ("mm: fail get_vaddr_frames() for filesystem-dax mappings") Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Dan Williams <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: David Sterba <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0b265c3 commit 1f704fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mm/frame_vector.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
6262
* get_user_pages_longterm() and disallow it for filesystem-dax
6363
* mappings.
6464
*/
65-
if (vma_is_fsdax(vma))
66-
return -EOPNOTSUPP;
65+
if (vma_is_fsdax(vma)) {
66+
ret = -EOPNOTSUPP;
67+
goto out;
68+
}
6769

6870
if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) {
6971
vec->got_ref = true;

0 commit comments

Comments
 (0)