summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodemgmt.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-22 16:29:23 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-22 16:29:23 +0100
commit0eac940b8a087576c66ecf8e0f294f2ceb3b607b (patch)
treea21f5376f5fec2c21fe23e90e3317f1a1c48cc3e /fs/jffs2/nodemgmt.c
parentfcb7578719529898aef9edce8e409e457a1c2d15 (diff)
downloadop-kernel-dev-0eac940b8a087576c66ecf8e0f294f2ceb3b607b.zip
op-kernel-dev-0eac940b8a087576c66ecf8e0f294f2ceb3b607b.tar.gz
[JFFS2] Add some preemptive BUG checks for XATTR code
In a couple of places, we assume that what's at the end of the ->next_in_ino list is a struct jffs2_inode_cache. Let's check for that, since we expect it to change soon. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/nodemgmt.c')
-rw-r--r--fs/jffs2/nodemgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index e10e58e..34a452b 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -661,6 +661,10 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
spin_lock(&c->erase_completion_lock);
ic = jffs2_raw_ref_to_ic(ref);
+ /* It seems we should never call jffs2_mark_node_obsolete() for
+ XATTR nodes.... yet. Make sure we notice if/when we change
+ that :) */
+ BUG_ON(ic->class != RAWNODE_CLASS_INODE_CACHE);
for (p = &ic->nodes; (*p) != ref; p = &((*p)->next_in_ino))
;
OpenPOWER on IntegriCloud