mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
f2fs: clean up error path in f2fs_readdir
No logic changes, just clean up the error path. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
807b1e1c8e
commit
e9837bc2a4
1 changed files with 5 additions and 8 deletions
|
@ -867,18 +867,15 @@ static int f2fs_readdir(struct file *file, struct dir_context *ctx)
|
|||
|
||||
make_dentry_ptr(inode, &d, (void *)dentry_blk, 1);
|
||||
|
||||
if (f2fs_fill_dentries(ctx, &d, n * NR_DENTRY_IN_BLOCK, &fstr))
|
||||
goto stop;
|
||||
if (f2fs_fill_dentries(ctx, &d, n * NR_DENTRY_IN_BLOCK, &fstr)) {
|
||||
kunmap(dentry_page);
|
||||
f2fs_put_page(dentry_page, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
ctx->pos = (n + 1) * NR_DENTRY_IN_BLOCK;
|
||||
kunmap(dentry_page);
|
||||
f2fs_put_page(dentry_page, 1);
|
||||
dentry_page = NULL;
|
||||
}
|
||||
stop:
|
||||
if (dentry_page && !IS_ERR(dentry_page)) {
|
||||
kunmap(dentry_page);
|
||||
f2fs_put_page(dentry_page, 1);
|
||||
}
|
||||
out:
|
||||
f2fs_fname_crypto_free_buffer(&fstr);
|
||||
|
|
Loading…
Reference in a new issue