Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6b22cb1 authored by Sheng Yong's avatar Sheng Yong Committed by Jaegeuk Kim
Browse files

f2fs: check if inmem_pages list is empty correctly



`cur' will never be NULL, we should check inmem_pages list instead.

Signed-off-by: default avatarSheng Yong <shengyong1@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 78c65118
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ void drop_inmem_page(struct inode *inode, struct page *page)
			break;
	}

	f2fs_bug_on(sbi, !cur || cur->page != page);
	f2fs_bug_on(sbi, list_empty(head) || cur->page != page);
	list_del(&cur->list);
	mutex_unlock(&fi->inmem_lock);