mtd/fs/jffs2 readinode.c,1.101,1.102
David Woodhouse
dwmw2 at infradead.org
Tue Jan 21 18:42:44 EST 2003
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv10743/fs/jffs2
Modified Files:
readinode.c
Log Message:
More clearing of REF_PRISTINE
Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- readinode.c 21 Jan 2003 18:11:29 -0000 1.101
+++ readinode.c 21 Jan 2003 23:42:41 -0000 1.102
@@ -110,6 +110,26 @@
if (ret)
return ret;
+ /* If we now share a page with other nodes, mark either previous
+ or next node REF_NORMAL, as appropriate. */
+ if (newfrag->ofs & (PAGE_CACHE_SIZE-1)) {
+ struct jffs2_node_frag *prev = frag_prev(newfrag);
+
+ mark_ref_normal(fn->raw);
+ /* If we don't start at zero there's _always_ a previous */
+ if (prev->node)
+ mark_ref_normal(prev->node->raw);
+ }
+
+ if ((newfrag->ofs+newfrag->size) & (PAGE_CACHE_SIZE-1)) {
+ struct jffs2_node_frag *next = frag_next(newfrag);
+
+ if (next) {
+ mark_ref_normal(fn->raw);
+ if (next->node)
+ mark_ref_normal(next->node->raw);
+ }
+ }
D2(jffs2_print_frag_list(f));
return 0;
}
More information about the linux-mtd-cvs
mailing list