aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/readinode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r--fs/jffs2/readinode.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 8c6665d0e334..f3b12d7fe9ab 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: readinode.c,v 1.133 2005/07/30 15:28:24 lunn Exp $ 10 * $Id: readinode.c,v 1.134 2005/07/31 08:20:44 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -21,30 +21,6 @@
21#include <linux/compiler.h> 21#include <linux/compiler.h>
22#include "nodelist.h" 22#include "nodelist.h"
23 23
24void jffs2_truncate_fragtree (struct jffs2_sb_info *c, struct rb_root *list, uint32_t size)
25{
26 struct jffs2_node_frag *frag = jffs2_lookup_node_frag(list, size);
27
28 JFFS2_DBG_FRAGTREE("truncating fragtree to 0x%08x bytes\n", size);
29
30 /* We know frag->ofs <= size. That's what lookup does for us */
31 if (frag && frag->ofs != size) {
32 if (frag->ofs+frag->size >= size) {
33 JFFS2_DBG_FRAGTREE2("truncating frag 0x%08x-0x%08x\n", frag->ofs, frag->ofs+frag->size);
34 frag->size = size - frag->ofs;
35 }
36 frag = frag_next(frag);
37 }
38 while (frag && frag->ofs >= size) {
39 struct jffs2_node_frag *next = frag_next(frag);
40
41 JFFS2_DBG_FRAGTREE("removing frag 0x%08x-0x%08x\n", frag->ofs, frag->ofs+frag->size);
42 frag_erase(frag, list);
43 jffs2_obsolete_node_frag(c, frag);
44 frag = next;
45 }
46}
47
48/* 24/*
49 * Put a new tmp_dnode_info into the temporaty RB-tree, keeping the list in 25 * Put a new tmp_dnode_info into the temporaty RB-tree, keeping the list in
50 * order of increasing version. 26 * order of increasing version.