diff mbox

[V2,0/3] drivers/staging: zcache: dynamic page cache/swap compression

Message ID 763a2305-27c6-4f44-8962-db72b434c037@default (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Magenheimer March 3, 2011, 5:29 p.m. UTC
None
diff mbox

Patch

diff -Napur -X linux-2.6.37.1/Documentation/dontdiff linux-2.6.37.1/mm/cleancache.c linux-2.6.37.1-fix/mm/cleancache.c
--- linux-2.6.37.1/mm/cleancache.c	2011-02-25 11:38:47.000000000 -0800
+++ linux-2.6.37.1-fix/mm/cleancache.c	2011-02-25 08:53:46.000000000 -0800
@@ -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;
 		}