Skip to content

Commit 015c0d4

Browse files
YuezhangMonamjaejeon
authored andcommitted
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 <[email protected]> Reviewed-by: Andy Wu <[email protected]> Reviewed-by: Aoyama Wataru <[email protected]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent 088f134 commit 015c0d4

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

fs/exfat/namei.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ static int __exfat_rename(struct inode *old_parent_inode,
11751175
struct exfat_inode_info *new_ei = NULL;
11761176
unsigned int new_entry_type = TYPE_UNUSED;
11771177
int new_entry = 0;
1178-
struct buffer_head *old_bh, *new_bh = NULL;
1178+
struct buffer_head *new_bh = NULL;
11791179

11801180
/* check the validity of pointer parameters */
11811181
if (new_path == NULL || strlen(new_path) == 0)
@@ -1191,13 +1191,6 @@ static int __exfat_rename(struct inode *old_parent_inode,
11911191
EXFAT_I(old_parent_inode)->flags);
11921192
dentry = ei->entry;
11931193

1194-
ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh);
1195-
if (!ep) {
1196-
ret = -EIO;
1197-
goto out;
1198-
}
1199-
brelse(old_bh);
1200-
12011194
/* check whether new dir is existing directory and empty */
12021195
if (new_inode) {
12031196
ret = -EIO;

0 commit comments

Comments
 (0)