f2fs: check if inmem_pages list is empty correctly
PATCH 1/1 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 <[email protected]>
--- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
@@ -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);
Signature · 6 lines
2.14.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 3 lines · Sheng Yong
`cur' will never be NULL, we should check
inmem_pageslist instead.Signed-off-by Sheng Yong <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,
Quoted 10 lines
--- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/segment.c +0
-0
fs/f2fs/segment.c void drop_inmem_page(struct inode *inode, struct page *page) · line 334
Quoted 8 lines
fs/f2fs/segment.c +1
-1@@ -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);
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot