@@ -43,14 +43,9 @@ static inline void vfat_d_version_set(struct dentry *dentry,
4343 * If it happened, the negative dentry isn't actually negative
4444 * anymore. So, drop it.
4545 */
46- static int vfat_revalidate_shortname (struct dentry * dentry )
46+ static bool vfat_revalidate_shortname (struct dentry * dentry , struct inode * dir )
4747{
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 ));
5449}
5550
5651static 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,
6257 /* This is not negative dentry. Always valid. */
6358 if (d_really_is_positive (dentry ))
6459 return 1 ;
65- return vfat_revalidate_shortname (dentry );
60+ return vfat_revalidate_shortname (dentry , dir );
6661}
6762
6863static 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,
9994 if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET ))
10095 return 0 ;
10196
102- return vfat_revalidate_shortname (dentry );
97+ return vfat_revalidate_shortname (dentry , dir );
10398}
10499
105100/* returns the length of a struct qstr, ignoring trailing dots */
0 commit comments