@@ -78,15 +78,14 @@ static int cleancache_get_key(struct ino
int (*fhfn)(struct dentry *, __u32 *fh, int *, int);
int maxlen = CLEANCACHE_KEY_MAX;
struct super_block *sb = inode->i_sb;
- struct dentry *d;
key->u.ino = inode->i_ino;
if (sb->s_export_op != NULL) {
fhfn = sb->s_export_op->encode_fh;
if (fhfn) {
- d = list_first_entry(&inode->i_dentry,
- struct dentry, d_alias);
- (void)(*fhfn)(d, &key->u.fh[0], &maxlen, 0);
+ struct dentry d;
+ d.d_inode = inode;
+ (void)(*fhfn)(&d, &key->u.fh[0], &maxlen, 0);
if (maxlen > CLEANCACHE_KEY_MAX)
return -1;
}