All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/7] exfat: remove unneeded codes from __exfat_rename()
@ 2022-12-13  2:36 Yuezhang.Mo
  0 siblings, 0 replies; only message in thread
From: Yuezhang.Mo @ 2022-12-13  2:36 UTC (permalink / raw)
  To: sj1557.seo, linkinjeon
  Cc: linux-fsdevel, linux-kernel, Andy.Wu, Wataru.Aoyama

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>
---
 fs/exfat/namei.c | 9 +--------
 1 file changed, 1 insertion(+), 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;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-13  2:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13  2:36 [PATCH v2 2/7] exfat: remove unneeded codes from __exfat_rename() Yuezhang.Mo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.