d_hash_and_lookup(): export, switch open-coded instances

* calling conventions change - ERR_PTR() is returned on ->d_hash() errors;
NULL is just for dcache miss now.
* exported, open-coded instances in ncpfs and cifs converted.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2013-02-11 23:20:37 -05:00
parent 3592ac4440
commit 4f522a247b
4 changed files with 18 additions and 24 deletions
+3 -7
View 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)