summaryrefslogtreecommitdiff
path: root/mm/gup.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2021-09-03 00:53:39 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-03 19:58:11 +0300
commit06a9e696639c5e0f457ae117c39ec4cbe5096dc9 (patch)
tree2af5a2d4ffd0a038924725b80e533372e8cf19b1 /mm/gup.c
parent0fef147ba7329d54a08b3b8c7e152b6dd5391199 (diff)
downloadlinux-06a9e696639c5e0f457ae117c39ec4cbe5096dc9.tar.xz
mm: gup: remove useless BUG_ON in __get_user_pages()
Indeed, this BUG_ON couldn't catch anything useful. We are sure ret == 0 here because we would already bail out if ret != 0 and ret is untouched till here. Link: https://lkml.kernel.org/r/20210807093620.21347-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Cc: Jan Kara <jack@suse.cz> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r--mm/gup.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/gup.c b/mm/gup.c
index 82074e819a8d..9f5b9a93ae21 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1149,7 +1149,6 @@ static long __get_user_pages(struct mm_struct *mm,
* We must stop here.
*/
BUG_ON(gup_flags & FOLL_NOWAIT);
- BUG_ON(ret != 0);
goto out;
}
continue;