]> Pileus Git - ~andy/linux/blobdiff - fs/jffs2/malloc.c
[PATCH] atmel: use ARRAY_SIZE()
[~andy/linux] / fs / jffs2 / malloc.c
index 4889d0700c0e6a32e7e998bf2785438f301613dd..33f291005012bedf622daaaaa4ebf5f77655d2a1 100644 (file)
@@ -190,7 +190,7 @@ void jffs2_free_tmp_dnode_info(struct jffs2_tmp_dnode_info *x)
        kmem_cache_free(tmp_dnode_info_slab, x);
 }
 
-struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
+static struct jffs2_raw_node_ref *jffs2_alloc_refblock(void)
 {
        struct jffs2_raw_node_ref *ret;
 
@@ -291,6 +291,7 @@ struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void)
 
        memset(xd, 0, sizeof(struct jffs2_xattr_datum));
        xd->class = RAWNODE_CLASS_XATTR_DATUM;
+       xd->node = (void *)xd;
        INIT_LIST_HEAD(&xd->xindex);
        return xd;
 }
@@ -309,6 +310,7 @@ struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void)
 
        memset(ref, 0, sizeof(struct jffs2_xattr_ref));
        ref->class = RAWNODE_CLASS_XATTR_REF;
+       ref->node = (void *)ref;
        return ref;
 }