X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fllite%2Fllite_nfs.c;h=f20bf657be5ddbb32950d08d1121b89f14f566e9;hb=070dc4383bef40b29934057fccbc0d9742472abb;hp=fa50439b1d5feedf1ccf8f22f353307f0e906653;hpb=6869932b552ac705f411de3362f01bd50c1f6f7d;p=fs%2Flustre-release.git diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index fa50439..f20bf65 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -48,6 +48,18 @@ #include #endif +__u32 get_uuid2int(const char *name, int len) +{ + __u32 key0 = 0x12a3fe2d, key1 = 0x37abe8f9; + while (len--) { + __u32 key = key1 + (key0 ^ (*name++ * 7152373)); + if (key & 0x80000000) key -= 0x7fffffff; + key1 = key0; + key0 = key; + } + return (key0 << 1); +} + static int ll_nfs_test_inode(struct inode *inode, void *opaque) { return lu_fid_eq(&ll_i2info(inode)->lli_fid, @@ -125,18 +137,7 @@ static struct dentry *ll_iget_for_nfs(struct super_block *sb, RETURN(ERR_PTR(-ENOMEM)); } - ll_set_dd(result); - - lock_dentry(result); - if (unlikely(result->d_op == &ll_init_d_ops)) { - result->d_op = &ll_d_ops; - unlock_dentry(result); - smp_wmb(); - ll_d_wakeup(result); - } else { - result->d_op = &ll_d_ops; - unlock_dentry(result); - } + ll_dops_init(result, 1); RETURN(result); }