diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-07-20 10:58:33 +0200 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2026-07-30 00:29:11 +0200 |
| commit | e462200886fb56cc318700b2fbbb2206ac28a656 (patch) | |
| tree | a50847477aa3ac38e6e5ddc62fdde2c23975b790 | |
| parent | da1f5a7dcf1826d90b8dffe7a2fb6c280d15227a (diff) | |
| download | linux-next-e462200886fb56cc318700b2fbbb2206ac28a656.tar.gz linux-next-e462200886fb56cc318700b2fbbb2206ac28a656.zip | |
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>
| -rw-r--r-- | arch/s390/mm/fault.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 2a9b9fb30d09..666fe8e99480 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -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); } } |
