Pull mem-attribute into release branch
[linux-2.6-block.git] / fs / jffs2 / xattr.c
index 25bc1ae0864843adc7024721262d2932cde4ce73..78fc08893a6c781ed94594e96f0408d4be21cbb7 100644 (file)
@@ -1,13 +1,14 @@
 /*
  * JFFS2 -- Journalling Flash File System, Version 2.
  *
- * Copyright (C) 2006  NEC Corporation
+ * Copyright © 2006  NEC Corporation
  *
  * Created by KaiGai Kohei <kaigai@ak.jp.nec.com>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
  */
+
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
@@ -399,8 +400,6 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu
 {
        /* must be called under down_write(xattr_sem) */
        if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) {
-               uint32_t xid = xd->xid, version = xd->version;
-
                unload_xattr_datum(c, xd);
                xd->flags |= JFFS2_XFLAGS_DEAD;
                if (xd->node == (void *)xd) {
@@ -411,7 +410,8 @@ static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datu
                }
                spin_unlock(&c->erase_completion_lock);
 
-               dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n", xid, version);
+               dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n",
+                         xd->xid, xd->version);
        }
 }
 
@@ -1215,7 +1215,6 @@ int jffs2_garbage_collect_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xatt
        rc = jffs2_reserve_space_gc(c, totlen, &length, JFFS2_SUMMARY_XATTR_SIZE);
        if (rc) {
                JFFS2_WARNING("jffs2_reserve_space_gc()=%d, request=%u\n", rc, totlen);
-               rc = rc ? rc : -EBADFD;
                goto out;
        }
        rc = save_xattr_datum(c, xd);