patch-2.4.9 linux/fs/jffs/inode-v23.c

Next file: linux/fs/jffs/intrep.c
Previous file: linux/fs/isofs/rock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/fs/jffs/inode-v23.c linux/fs/jffs/inode-v23.c
@@ -157,7 +157,7 @@
 		D1(printk (KERN_NOTICE "jffs_put_super(): Telling gc thread to die.\n"));
 		send_sig(SIGKILL, c->gc_task, 1);
 	}
-	down (&c->gc_thread_sem);
+	wait_for_completion(&c->gc_thread_comp);
 
 	D1(printk (KERN_NOTICE "jffs_put_super(): Successfully waited on thread.\n"));
 
@@ -718,7 +718,7 @@
 
 	offset = page->index << PAGE_CACHE_SHIFT;
 	if (offset < inode->i_size) {
-		read_len = jffs_min(inode->i_size - offset, PAGE_SIZE);
+		read_len = min(long, inode->i_size - offset, PAGE_SIZE);
 		r = jffs_read_data(f, buf, offset, read_len);
 		if (r == read_len) {
 			if (read_len < PAGE_SIZE) {
@@ -1373,7 +1373,9 @@
 		goto out_isem;
 	}
 	
-	thiscount = jffs_min(c->fmc->max_chunk_size - sizeof(struct jffs_raw_inode), count);
+	thiscount = min(unsigned int,
+			c->fmc->max_chunk_size - sizeof(struct jffs_raw_inode),
+			count);
 
 	if (!(vbuf = kmalloc(thiscount, GFP_KERNEL))) {
 		D(printk("jffs_file_write(): failed to allocate bounce buffer. Fix me to use page cache\n"));
@@ -1437,7 +1439,8 @@
 		raw_inode.deleted = 0;
 		
 		if (pos < f->size) {
-			node->removed_size = raw_inode.rsize = jffs_min(thiscount, f->size - pos);
+			node->removed_size = raw_inode.rsize =
+				min(unsigned int, thiscount, f->size - pos);
 			
 			/* If this node is going entirely over the top of old data, 
 			   we can allow it to go into the reserved space, because 
@@ -1479,7 +1482,9 @@
 
 		D3(printk("jffs_file_write(): new f_pos %ld.\n", (long)pos));
 
-		thiscount = jffs_min(c->fmc->max_chunk_size - sizeof(struct jffs_raw_inode), count);
+		thiscount = min(unsigned int,
+			c->fmc->max_chunk_size - sizeof(struct jffs_raw_inode),
+			count);
 	}
  out:
 	D3(printk (KERN_NOTICE "file_write(): up biglock\n"));

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