diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2021-09-03 00:53:39 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-03 19:58:11 +0300 |
commit | 06a9e696639c5e0f457ae117c39ec4cbe5096dc9 (patch) | |
tree | 2af5a2d4ffd0a038924725b80e533372e8cf19b1 /mm/gup.c | |
parent | 0fef147ba7329d54a08b3b8c7e152b6dd5391199 (diff) | |
download | linux-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.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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; |