diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-09-26 03:20:46 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-09-29 11:48:34 +0300 |
commit | 17f930e0a649e158a567504df7bb01c90a8514c1 (patch) | |
tree | 289f84e08c29d5287f40b85551bdd0e14f8fcb0d /fs/f2fs/dir.c | |
parent | f99ba9add67ce63eca3fe68a3d5e9996cd2c33b5 (diff) | |
download | linux-17f930e0a649e158a567504df7bb01c90a8514c1.tar.xz |
f2fs: remove unneeded parameter in find_in_block()
We can relocate @res_page assignment in find_in_block() to
its caller, so unneeded parameter could be removed for cleanup.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index a18f839b6fb2..74342d9836d7 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -191,21 +191,15 @@ static unsigned long dir_block_index(unsigned int level, static struct f2fs_dir_entry *find_in_block(struct inode *dir, struct page *dentry_page, const struct f2fs_filename *fname, - int *max_slots, - struct page **res_page) + int *max_slots) { struct f2fs_dentry_block *dentry_blk; - struct f2fs_dir_entry *de; struct f2fs_dentry_ptr d; dentry_blk = (struct f2fs_dentry_block *)page_address(dentry_page); make_dentry_ptr_block(dir, &d, dentry_blk); - de = f2fs_find_target_dentry(&d, fname, max_slots); - if (de) - *res_page = dentry_page; - - return de; + return f2fs_find_target_dentry(&d, fname, max_slots); } #ifdef CONFIG_UNICODE @@ -331,10 +325,11 @@ static struct f2fs_dir_entry *find_in_level(struct inode *dir, } } - de = find_in_block(dir, dentry_page, fname, &max_slots, - res_page); - if (de) + de = find_in_block(dir, dentry_page, fname, &max_slots); + if (de) { + *res_page = dentry_page; break; + } if (max_slots >= s) room = true; |