diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index bd14cef1b08f..2d1114b0ceef 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3903,10 +3903,10 @@ static int redirty_blocks(struct inode *inode, pgoff_t page_idx, int len) for (i = 0; i < page_len; i++, redirty_idx++) { page = find_lock_page(mapping, redirty_idx); - if (!page) { - ret = -ENOMEM; - break; - } + + /* It will never fail, when page has pinned above */ + f2fs_bug_on(F2FS_I_SB(inode), !page); + set_page_dirty(page); f2fs_put_page(page, 1); f2fs_put_page(page, 0);