]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
exfat_d_revalidate(): use stable parent inode passed by caller
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 Jan 2025 06:13:16 +0000 (01:13 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 28 Jan 2025 00:25:23 +0000 (19:25 -0500)
... no need to bother with ->d_lock and ->d_parent->d_inode.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exfat/namei.c

index e3b4feccba07737872359adeec8c183e2b2fcef4..61c7164b85b301d891b2c835495cbc6dfd1ccc27 100644 (file)
@@ -34,8 +34,6 @@ static inline void exfat_d_version_set(struct dentry *dentry,
 static int exfat_d_revalidate(struct inode *dir, const struct qstr *name,
                              struct dentry *dentry, unsigned int flags)
 {
-       int ret;
-
        if (flags & LOOKUP_RCU)
                return -ECHILD;
 
@@ -59,11 +57,7 @@ static int exfat_d_revalidate(struct inode *dir, const struct qstr *name,
        if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
                return 0;
 
-       spin_lock(&dentry->d_lock);
-       ret = inode_eq_iversion(d_inode(dentry->d_parent),
-                       exfat_d_version(dentry));
-       spin_unlock(&dentry->d_lock);
-       return ret;
+       return inode_eq_iversion(dir, exfat_d_version(dentry));
 }
 
 /* returns the length of a struct qstr, ignoring trailing dots if necessary */