Skip to content

Commit

Permalink
mm/filemap.c: remove else after a return
Browse files Browse the repository at this point in the history
The `else' is not useful after a `return' in __lock_page_or_retry().

[akpm@linux-foundation.org: coding style fixes]

Link: https://lkml.kernel.org/r/20201202154720.115162-1-carver4lio@163.com
Signed-off-by: Hailong Liu<liu.hailong6@zte.com.cn>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Hailong Liu authored and Linus Torvalds committed Dec 15, 2020
1 parent 649c6df commit 800bca7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,19 +1583,20 @@ int __lock_page_or_retry(struct page *page, struct mm_struct *mm,
else
wait_on_page_locked(page);
return 0;
} else {
if (flags & FAULT_FLAG_KILLABLE) {
int ret;
}
if (flags & FAULT_FLAG_KILLABLE) {
int ret;

ret = __lock_page_killable(page);
if (ret) {
mmap_read_unlock(mm);
return 0;
}
} else
__lock_page(page);
return 1;
ret = __lock_page_killable(page);
if (ret) {
mmap_read_unlock(mm);
return 0;
}
} else {
__lock_page(page);
}
return 1;

}

/**
Expand Down

0 comments on commit 800bca7

Please sign in to comment.