]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/ncpfs/dir.c
d_hash_and_lookup(): export, switch open-coded instances
[karo-tx-linux.git] / fs / ncpfs / dir.c
index 4117e7b377bbf731a5345ef8b640ad5aa6607837..8163260936561f07834f90beb2055dcd9300e1a6 100644 (file)
@@ -593,14 +593,10 @@ ncp_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
                return 1; /* I'm not sure */
 
        qname.name = __name;
-       qname.hash = full_name_hash(qname.name, qname.len);
-
-       if (dentry->d_op && dentry->d_op->d_hash)
-               if (dentry->d_op->d_hash(dentry, dentry->d_inode, &qname) != 0)
-                       goto end_advance;
-
-       newdent = d_lookup(dentry, &qname);
 
+       newdent = d_hash_and_lookup(dentry, &qname);
+       if (unlikely(IS_ERR(newdent)))
+               goto end_advance;
        if (!newdent) {
                newdent = d_alloc(dentry, &qname);
                if (!newdent)