aboutsummaryrefslogtreecommitdiff
path: root/fs/exfat/namei.c
diff options
context:
space:
mode:
authorGravatar Yuezhang Mo <Yuezhang.Mo@sony.com> 2022-04-10 16:12:14 +0800
committerGravatar Namjae Jeon <linkinjeon@kernel.org> 2022-12-12 11:02:50 +0900
commit72880cb5f157514d797d5f6ab3184bbde671a18a (patch)
tree0c0e9acd483c5138b0f32e840c62635aafcb3ee5 /fs/exfat/namei.c
parentexfat: remove unneeded codes from __exfat_rename() (diff)
downloadlinux-72880cb5f157514d797d5f6ab3184bbde671a18a.tar.gz
linux-72880cb5f157514d797d5f6ab3184bbde671a18a.tar.bz2
linux-72880cb5f157514d797d5f6ab3184bbde671a18a.zip
exfat: remove unnecessary arguments from exfat_find_dir_entry()
This commit removes argument 'num_entries' and 'type' from exfat_find_dir_entry(). Code refinement, no functional changes. Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Reviewed-by: Andy Wu <Andy.Wu@sony.com> Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'fs/exfat/namei.c')
-rw-r--r--fs/exfat/namei.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index 347c8df45bd0..5f995eba5dbb 100644
--- a/fs/exfat/namei.c
+++ b/fs/exfat/namei.c
@@ -597,7 +597,7 @@ unlock:
static int exfat_find(struct inode *dir, struct qstr *qname,
struct exfat_dir_entry *info)
{
- int ret, dentry, num_entries, count;
+ int ret, dentry, count;
struct exfat_chain cdir;
struct exfat_uni_name uni_name;
struct super_block *sb = dir->i_sb;
@@ -616,10 +616,6 @@ static int exfat_find(struct inode *dir, struct qstr *qname,
if (ret)
return ret;
- num_entries = exfat_calc_num_entries(&uni_name);
- if (num_entries < 0)
- return num_entries;
-
/* check the validation of hint_stat and initialize it if required */
if (ei->version != (inode_peek_iversion_raw(dir) & 0xffffffff)) {
ei->hint_stat.clu = cdir.dir;
@@ -629,9 +625,7 @@ static int exfat_find(struct inode *dir, struct qstr *qname,
}
/* search the file name for directories */
- dentry = exfat_find_dir_entry(sb, ei, &cdir, &uni_name,
- num_entries, TYPE_ALL, &hint_opt);
-
+ dentry = exfat_find_dir_entry(sb, ei, &cdir, &uni_name, &hint_opt);
if (dentry < 0)
return dentry; /* -error value */