mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
s390/mm: Use goto statement in do_secure_storage_access()
Make do_secure_storage_access() look more like the do_exception() by using a goto statement to get rid of an extra open coded mmap_read_unlock() call. Just cosmetic, no functional change. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
committed by
Vasily Gorbik
parent
da1f5a7dcf
commit
e462200886
@@ -453,10 +453,8 @@ void do_secure_storage_access(struct pt_regs *regs)
|
||||
if (!vma)
|
||||
return handle_fault_error_nolock(regs, SEGV_MAPERR);
|
||||
folio = folio_walk_start(&fw, vma, addr, 0);
|
||||
if (!folio) {
|
||||
mmap_read_unlock(mm);
|
||||
return;
|
||||
}
|
||||
if (!folio)
|
||||
goto out;
|
||||
/* arch_make_folio_accessible() needs a raised refcount. */
|
||||
folio_get(folio);
|
||||
rc = arch_make_folio_accessible(folio);
|
||||
@@ -464,6 +462,7 @@ void do_secure_storage_access(struct pt_regs *regs)
|
||||
folio_walk_end(&fw, vma);
|
||||
if (rc)
|
||||
return handle_fault_error(regs, SEGV_ACCERR);
|
||||
out:
|
||||
mmap_read_unlock(mm);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user