diff options
author | Estelle Hammache <estelle.hammache@st.com> | 2005-01-28 18:53:05 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 12:16:06 +0200 |
commit | 9b88f47390efb72540b050628ebc04202d91c6ec (patch) | |
tree | 13d56b9a76a76b7dca5509cad63827570b3496b1 /fs/jffs2/nodemgmt.c | |
parent | 6170b43401a3230756ff76287ee07db0d75eddde (diff) | |
download | op-kernel-dev-9b88f47390efb72540b050628ebc04202d91c6ec.zip op-kernel-dev-9b88f47390efb72540b050628ebc04202d91c6ec.tar.gz |
[JFFS2] Code cleanup
Code beautification and block filing correction for optimization.
Signed-off-by: Estelle Hammache <estelle.hammache@st.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/nodemgmt.c')
-rw-r--r-- | fs/jffs2/nodemgmt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index b2a5387..5e1e8ca 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: nodemgmt.c,v 1.116 2005/01/24 21:30:22 hammache Exp $ + * $Id: nodemgmt.c,v 1.117 2005/01/25 20:11:11 hammache Exp $ * */ @@ -310,8 +310,8 @@ int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_r #if 1 /* we could get some obsolete nodes after nextblock was refiled in wbuf.c */ - if ( (c->nextblock || !ref_obsolete(new)) - &&(jeb != c->nextblock || (ref_offset(new)) != jeb->offset + (c->sector_size - jeb->free_size))) { + if ((c->nextblock || !ref_obsolete(new)) + &&(jeb != c->nextblock || ref_offset(new) != jeb->offset + (c->sector_size - jeb->free_size))) { printk(KERN_WARNING "argh. node added in wrong place\n"); jffs2_free_raw_node_ref(new); return -EINVAL; @@ -335,7 +335,7 @@ int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_r c->used_size += len; } - if (!jeb->free_size && !jeb->dirty_size && !jeb->wasted_size) { + if (!jeb->free_size && !jeb->dirty_size && !ISDIRTY(jeb->wasted_size)) { /* If it lives on the dirty_list, jffs2_reserve_space will put it there */ D1(printk(KERN_DEBUG "Adding full erase block at 0x%08x to clean_list (free 0x%08x, dirty 0x%08x, used 0x%08x\n", jeb->offset, jeb->free_size, jeb->dirty_size, jeb->used_size)); |