Merge tag 'ceph-for-5.20-rc1' of https://github.com/ceph/ceph-client
[linux-2.6-block.git] / include / linux / dcache.h
index bb72361834def225788eb8ce8c860c7ccdabccf2..92c78ed02b54d5bf59c9f5c7506dcf0c6afc1512 100644 (file)
@@ -351,7 +351,7 @@ static inline void dont_mount(struct dentry *dentry)
        spin_unlock(&dentry->d_lock);
 }
 
-extern void __d_lookup_done(struct dentry *);
+extern void __d_lookup_unhash_wake(struct dentry *dentry);
 
 static inline int d_in_lookup(const struct dentry *dentry)
 {
@@ -360,11 +360,8 @@ static inline int d_in_lookup(const struct dentry *dentry)
 
 static inline void d_lookup_done(struct dentry *dentry)
 {
-       if (unlikely(d_in_lookup(dentry))) {
-               spin_lock(&dentry->d_lock);
-               __d_lookup_done(dentry);
-               spin_unlock(&dentry->d_lock);
-       }
+       if (unlikely(d_in_lookup(dentry)))
+               __d_lookup_unhash_wake(dentry);
 }
 
 extern void dput(struct dentry *);