diff options
author | Yuezhang Mo <Yuezhang.Mo@sony.com> | 2022-08-15 10:15:16 +0800 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2022-12-12 11:02:50 +0900 |
commit | 015c0d4f6b1e65857de88279f07d7ecc5e305137 (patch) | |
tree | 5412eef6e3b2414b097e5f6403fd0ada9ee16555 | |
parent | 088f1343d9108c16fca064951d85e6de9f5cab42 (diff) | |
download | lwn-015c0d4f6b1e65857de88279f07d7ecc5e305137.tar.gz lwn-015c0d4f6b1e65857de88279f07d7ecc5e305137.zip |
exfat: remove unneeded codes from __exfat_rename()
The code gets the dentry, but the dentry is not used, remove the
code.
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>
-rw-r--r-- | fs/exfat/namei.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index 01e4e8c60bbe..347c8df45bd0 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -1175,7 +1175,7 @@ static int __exfat_rename(struct inode *old_parent_inode, struct exfat_inode_info *new_ei = NULL; unsigned int new_entry_type = TYPE_UNUSED; int new_entry = 0; - struct buffer_head *old_bh, *new_bh = NULL; + struct buffer_head *new_bh = NULL; /* check the validity of pointer parameters */ if (new_path == NULL || strlen(new_path) == 0) @@ -1191,13 +1191,6 @@ static int __exfat_rename(struct inode *old_parent_inode, EXFAT_I(old_parent_inode)->flags); dentry = ei->entry; - ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh); - if (!ep) { - ret = -EIO; - goto out; - } - brelse(old_bh); - /* check whether new dir is existing directory and empty */ if (new_inode) { ret = -EIO; |