From: Hailong Liu <carver4lio@xxxxxxx> The *else* is not useful after a *return* in __lock_page_or_retry(). Signed-off-by: Hailong Liu<liu.hailong6@xxxxxxxxxx> --- mm/filemap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 0b2067b3c..55e6ad1b0 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1583,19 +1583,19 @@ 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; - - ret = __lock_page_killable(page); - if (ret) { - mmap_read_unlock(mm); - return 0; - } - } else - __lock_page(page); - return 1; } + 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; + } /** -- 2.17.1