summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodelist.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-21 03:46:05 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-21 03:46:05 +0100
commit68270995f29f1a82b3eaab01df63ea7e721e2fa6 (patch)
tree44388152f209c9f8f0df8eec33efaaca7817ec6d /fs/jffs2/nodelist.c
parent7807ef7ba2a41c05f6197381f572dd38baa6c1ce (diff)
downloadop-kernel-dev-68270995f29f1a82b3eaab01df63ea7e721e2fa6.zip
op-kernel-dev-68270995f29f1a82b3eaab01df63ea7e721e2fa6.tar.gz
[JFFS2] Introduce jffs2_scan_dirty_space() function.
To eliminate the __totlen field from struct jffs2_raw_node_ref, we need to allocate nodes for dirty space instead of just tweaking the accounting data. Introduce jffs2_scan_dirty_space() in preparation for that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/nodelist.c')
-rw-r--r--fs/jffs2/nodelist.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index 1fc8aed..0050685 100644
--- a/fs/jffs2/nodelist.c
+++ b/fs/jffs2/nodelist.c
@@ -1080,3 +1080,14 @@ void jffs2_link_node_ref(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
ref->__totlen = len;
ref->next_phys = NULL;
}
+
+int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
+ uint32_t size)
+{
+ c->dirty_size += size;
+ c->free_size -= size;
+ jeb->dirty_size += size;
+ jeb->free_size -= size;
+
+ return 0;
+}
OpenPOWER on IntegriCloud