Commit 7a3f2263 authored by Miaohe Lin's avatar Miaohe Lin Committed by Linus Torvalds

mm/highmem: remove unnecessary done label

Remove unnecessary done label to simplify the code.

Link: https://lkml.kernel.org/r/20220126092542.64659-1-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d7ca25c5
...@@ -736,11 +736,11 @@ void *page_address(const struct page *page) ...@@ -736,11 +736,11 @@ void *page_address(const struct page *page)
list_for_each_entry(pam, &pas->lh, list) { list_for_each_entry(pam, &pas->lh, list) {
if (pam->page == page) { if (pam->page == page) {
ret = pam->virtual; ret = pam->virtual;
goto done; break;
} }
} }
} }
done:
spin_unlock_irqrestore(&pas->lock, flags); spin_unlock_irqrestore(&pas->lock, flags);
return ret; return ret;
} }
...@@ -773,13 +773,12 @@ void set_page_address(struct page *page, void *virtual) ...@@ -773,13 +773,12 @@ void set_page_address(struct page *page, void *virtual)
list_for_each_entry(pam, &pas->lh, list) { list_for_each_entry(pam, &pas->lh, list) {
if (pam->page == page) { if (pam->page == page) {
list_del(&pam->list); list_del(&pam->list);
spin_unlock_irqrestore(&pas->lock, flags); break;
goto done;
} }
} }
spin_unlock_irqrestore(&pas->lock, flags); spin_unlock_irqrestore(&pas->lock, flags);
} }
done:
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment