From 4f522a247bc26d4ab5c8fc406ffffa8b3a77abe3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 11 Feb 2013 23:20:37 -0500 Subject: 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 --- fs/cifs/readdir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fs/cifs') diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 7255b0c7aa7e..df40cc5fd13a 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -82,12 +82,10 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name, cFYI(1, "%s: for %s", __func__, name->name); - if (parent->d_op && parent->d_op->d_hash) - parent->d_op->d_hash(parent, parent->d_inode, name); - else - name->hash = full_name_hash(name->name, name->len); + dentry = d_hash_and_lookup(parent, name); + if (unlikely(IS_ERR(dentry))) + return; - dentry = d_lookup(parent, name); if (dentry) { int err; -- cgit v1.2.3