]> Pileus Git - ~andy/linux/blobdiff - fs/jffs2/scan.c
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
[~andy/linux] / fs / jffs2 / scan.c
index 79638f56c5ea2df6bd71b1ba915c3541e3105b55..e2413466ddd5ac34d54f580769667111c64b8414 100644 (file)
@@ -274,8 +274,8 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
        return ret;
 }
 
-int jffs2_fill_scan_buf (struct jffs2_sb_info *c, void *buf,
-                               uint32_t ofs, uint32_t len)
+static int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf,
+                              uint32_t ofs, uint32_t len)
 {
        int ret;
        size_t retlen;
@@ -332,10 +332,8 @@ static int jffs2_scan_xattr_node(struct jffs2_sb_info *c, struct jffs2_erasebloc
        xid = je32_to_cpu(rx->xid);
        version = je32_to_cpu(rx->version);
 
-       totlen = sizeof(struct jffs2_raw_xattr);
-       if (version != XDATUM_DELETE_MARKER)
-               totlen += rx->name_len + 1 + je16_to_cpu(rx->value_len);
-       totlen = PAD(totlen);
+       totlen = PAD(sizeof(struct jffs2_raw_xattr)
+                       + rx->name_len + 1 + je16_to_cpu(rx->value_len));
        if (totlen != je32_to_cpu(rx->totlen)) {
                JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%u\n",
                              ofs, je32_to_cpu(rx->totlen), totlen);