@@ -43,14 +43,9 @@ static inline void vfat_d_version_set(struct dentry *dentry,
43
43
* If it happened, the negative dentry isn't actually negative
44
44
* anymore. So, drop it.
45
45
*/
46
- static int vfat_revalidate_shortname (struct dentry * dentry )
46
+ static bool vfat_revalidate_shortname (struct dentry * dentry , struct inode * dir )
47
47
{
48
- int ret = 1 ;
49
- spin_lock (& dentry -> d_lock );
50
- if (!inode_eq_iversion (d_inode (dentry -> d_parent ), vfat_d_version (dentry )))
51
- ret = 0 ;
52
- spin_unlock (& dentry -> d_lock );
53
- return ret ;
48
+ return inode_eq_iversion (dir , vfat_d_version (dentry ));
54
49
}
55
50
56
51
static int vfat_revalidate (struct inode * dir , const struct qstr * name ,
@@ -62,7 +57,7 @@ static int vfat_revalidate(struct inode *dir, const struct qstr *name,
62
57
/* This is not negative dentry. Always valid. */
63
58
if (d_really_is_positive (dentry ))
64
59
return 1 ;
65
- return vfat_revalidate_shortname (dentry );
60
+ return vfat_revalidate_shortname (dentry , dir );
66
61
}
67
62
68
63
static int vfat_revalidate_ci (struct inode * dir , const struct qstr * name ,
@@ -99,7 +94,7 @@ static int vfat_revalidate_ci(struct inode *dir, const struct qstr *name,
99
94
if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET ))
100
95
return 0 ;
101
96
102
- return vfat_revalidate_shortname (dentry );
97
+ return vfat_revalidate_shortname (dentry , dir );
103
98
}
104
99
105
100
/* returns the length of a struct qstr, ignoring trailing dots */
0 commit comments