diff options
author | Sheng Yong <shengyong1@huawei.com> | 2018-04-17 17:12:27 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-05-31 11:31:46 -0700 |
commit | d0891e84e1e61938aa8a3b75cb10a34769de022a (patch) | |
tree | a2e8521cb515342471228f2b0cd7deb234579c0a /fs | |
parent | 27319ba4044c0c67d62ae39e53c0118c89f0a029 (diff) | |
download | linux-stable-d0891e84e1e61938aa8a3b75cb10a34769de022a.tar.gz linux-stable-d0891e84e1e61938aa8a3b75cb10a34769de022a.tar.bz2 linux-stable-d0891e84e1e61938aa8a3b75cb10a34769de022a.zip |
f2fs: check if inmem_pages list is empty correctly
`cur' will never be NULL, we should check inmem_pages list instead.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index e22911f2a378..33d33db15d2f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -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); |