Skip to contentSkip to conversation

exfat: get rid of ->d_time mess

PATCH New Al Viro 1 participant 1 message Oct 28, 2019

Subsystems (2)
lore
Share & tools
lore

Al Viro

author maintainer
#0 lore raw

PATCH 1/1 exfat: get rid of ->d_time mess

	Nothing ever reads ->d_time of exfat dentries.  Remove the

assignments, especially since exfat_lookup() one is actually oopsable - d_splice_alias() may return ERR_PTR()...

---

drivers/staging/exfat/exfat_super.c +0 -6
index 3b2b0ceb7297..063a0d0016bf 100644
@@ -2394,7 +2394,6 @@ static int exfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 	 * timestamp is already written, so mark_inode_dirty() is unnecessary.
 	 */
 
-	dentry->d_time = GET_IVERSION(dentry->d_parent->d_inode);
 	d_instantiate(dentry, inode);
 
 out:
@@ -2479,10 +2478,7 @@ static struct dentry *exfat_lookup(struct inode *dir, struct dentry *dentry,
 	dput(alias);
 out:
 	__unlock_super(sb);
-	dentry->d_time = GET_IVERSION(dentry->d_parent->d_inode);
 	dentry = d_splice_alias(inode, dentry);
-	if (dentry)
-		dentry->d_time = GET_IVERSION(dentry->d_parent->d_inode);
 	pr_debug("%s exited 2\n", __func__);
 	return dentry;
 
@@ -2620,7 +2616,6 @@ static int exfat_symlink(struct inode *dir, struct dentry *dentry,
 		goto out;
 	}
 
-	dentry->d_time = GET_IVERSION(dentry->d_parent->d_inode);
 	d_instantiate(dentry, inode);
 
 out:
@@ -2674,7 +2669,6 @@ static int exfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 	inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
 	/* timestamp is already written, so mark_inode_dirty() is unneeded. */
 
-	dentry->d_time = GET_IVERSION(dentry->d_parent->d_inode);
 	d_instantiate(dentry, inode);
 
 out: