patch-2.4.11-dontuse linux/fs/jffs2/nodemgmt.c

Next file: linux/fs/jffs2/pushpull.c
Previous file: linux/fs/jffs2/nodelist.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/fs/jffs2/nodemgmt.c linux/fs/jffs2/nodemgmt.c
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: nodemgmt.c,v 1.39 2001/04/11 22:20:26 dwmw2 Exp $
+ * $Id: nodemgmt.c,v 1.45 2001/09/20 08:05:05 dwmw2 Exp $
  *
  */
 
@@ -100,12 +100,13 @@
 			ret = jffs2_garbage_collect_pass(c);
 			if (ret)
 				return ret;
-			if (signal_pending(current)) {
-				return -EINTR;
-			}
-			if(current->need_resched) {
+
+			if (current->need_resched)
 				schedule();
-			}
+
+			if (signal_pending(current))
+				return -EINTR;
+
 			down(&c->alloc_sem);
 			spin_lock_bh(&c->erase_completion_lock);
 		}
@@ -347,6 +348,8 @@
 	spin_unlock_bh(&c->erase_completion_lock);
 
 	if (c->mtd->type != MTD_NORFLASH && c->mtd->type != MTD_RAM)
+		return;
+	if (OFNI_BS_2SFFJ(c)->s_flags & MS_RDONLY)
 		return;
 
 	D1(printk(KERN_DEBUG "obliterating obsoleted node at 0x%08x\n", ref->flash_offset &~3));

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)