* [PATCH] exfat: get rid of ->d_time mess
@ 2019-10-28 13:54 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2019-10-28 13:54 UTC (permalink / raw)
To: Valdis Kletnieks; +Cc: linux-fsdevel
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()...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c
index 3b2b0ceb7297..063a0d0016bf 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -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:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-28 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-28 13:54 [PATCH] exfat: get rid of ->d_time mess Al Viro
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.