提交 e9837bc2 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

f2fs: clean up error path in f2fs_readdir

No logic changes, just clean up the error path.
Signed-off-by: NChao Yu <chao2.yu@samsung.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 807b1e1c
...@@ -867,16 +867,13 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx) ...@@ -867,16 +867,13 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
make_dentry_ptr(inode, &d, (void *)dentry_blk, 1); make_dentry_ptr(inode, &d, (void *)dentry_blk, 1);
if (f2fs_fill_dentries(ctx, &d, n * NR_DENTRY_IN_BLOCK, &fstr)) if (f2fs_fill_dentries(ctx, &d, n * NR_DENTRY_IN_BLOCK, &fstr)) {
goto stop;
ctx->pos = (n + 1) * NR_DENTRY_IN_BLOCK;
kunmap(dentry_page); kunmap(dentry_page);
f2fs_put_page(dentry_page, 1); f2fs_put_page(dentry_page, 1);
dentry_page = NULL; break;
} }
stop:
if (dentry_page && !IS_ERR(dentry_page)) { ctx->pos = (n + 1) * NR_DENTRY_IN_BLOCK;
kunmap(dentry_page); kunmap(dentry_page);
f2fs_put_page(dentry_page, 1); f2fs_put_page(dentry_page, 1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册