* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
return (key0 << 1);
}
+static int ll_nfs_test_inode(struct inode *inode, void *opaque)
+{
+ return lu_fid_eq(&ll_i2info(inode)->lli_fid,
+ (struct lu_fid *)opaque);
+}
+
static struct inode *search_inode_for_lustre(struct super_block *sb,
const struct lu_fid *fid)
{
struct ptlrpc_request *req = NULL;
struct inode *inode = NULL;
int eadatalen = 0;
- ino_t ino = cl_fid_build_ino(fid);
+ unsigned long hash = (unsigned long) cl_fid_build_ino(fid);
struct md_op_data *op_data;
int rc;
ENTRY;
- CDEBUG(D_INFO, "searching inode for:(%lu,"DFID")\n", ino, PFID(fid));
+ CDEBUG(D_INFO, "searching inode for:(%lu,"DFID")\n", hash, PFID(fid));
+
+ inode = ilookup5(sb, hash, ll_nfs_test_inode, (void *)fid);
+ if (inode)
+ RETURN(inode);
rc = ll_get_max_mdsize(sbi, &eadatalen);
if (rc)