## Automatically generated incremental diff
## From:   linux-2.4.17-rc2
## To:     linux-2.4.17
## Robot:  $Id: make-incremental-diff,v 1.9 2001/12/10 00:06:56 hpa Exp $

diff -urN linux-2.4.17-rc2/Makefile linux/Makefile
--- linux-2.4.17-rc2/Makefile	Fri Dec 21 09:54:07 2001
+++ linux/Makefile	Fri Dec 21 09:54:11 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 17
-EXTRAVERSION = -rc2
+EXTRAVERSION =
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.17-rc2/arch/alpha/kernel/alpha_ksyms.c linux/arch/alpha/kernel/alpha_ksyms.c
--- linux-2.4.17-rc2/arch/alpha/kernel/alpha_ksyms.c	Tue Nov 20 15:49:31 2001
+++ linux/arch/alpha/kernel/alpha_ksyms.c	Fri Dec 21 09:54:11 2001
@@ -258,3 +258,8 @@
 EXPORT_SYMBOL_NOVERS(memchr);
 
 EXPORT_SYMBOL(get_wchan);
+
+#ifdef CONFIG_ALPHA_IRONGATE
+EXPORT_SYMBOL(irongate_ioremap);
+EXPORT_SYMBOL(irongate_iounmap);
+#endif
diff -urN linux-2.4.17-rc2/drivers/net/dmfe.c linux/drivers/net/dmfe.c
--- linux-2.4.17-rc2/drivers/net/dmfe.c	Fri Dec 21 09:54:08 2001
+++ linux/drivers/net/dmfe.c	Fri Nov  9 13:50:01 2001
@@ -527,7 +527,7 @@
 }
 
 
-static void __devexit dmfe_remove_one (struct pci_dev *pdev)
+static void __exit dmfe_remove_one (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	struct dmfe_board_info *db = dev->priv;
@@ -2059,7 +2059,7 @@
 	name:		"dmfe",
 	id_table:	dmfe_pci_tbl,
 	probe:		dmfe_init_one,
-	remove:		__devexit_p(dmfe_remove_one),
+	remove:		dmfe_remove_one,
 };
 
 MODULE_AUTHOR("Sten Wang, sten_wang@davicom.com.tw");
diff -urN linux-2.4.17-rc2/drivers/net/hamachi.c linux/drivers/net/hamachi.c
--- linux-2.4.17-rc2/drivers/net/hamachi.c	Fri Dec 21 09:54:08 2001
+++ linux/drivers/net/hamachi.c	Tue Oct  9 15:13:03 2001
@@ -1981,7 +1981,7 @@
 }
 
 
-static void __devexit hamachi_remove_one (struct pci_dev *pdev)
+static void __exit hamachi_remove_one (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 
@@ -2011,7 +2011,7 @@
 	name:		DRV_NAME,
 	id_table:	hamachi_pci_tbl,
 	probe:		hamachi_init_one,
-	remove:		__devexit_p(hamachi_remove_one),
+	remove:		hamachi_remove_one,
 };
 
 static int __init hamachi_init (void)
diff -urN linux-2.4.17-rc2/drivers/net/tokenring/abyss.c linux/drivers/net/tokenring/abyss.c
--- linux-2.4.17-rc2/drivers/net/tokenring/abyss.c	Fri Dec 21 09:54:08 2001
+++ linux/drivers/net/tokenring/abyss.c	Thu Sep 13 16:04:43 2001
@@ -433,7 +433,7 @@
 	return 0;
 }
 
-static void __devexit abyss_detach (struct pci_dev *pdev)
+static void __exit abyss_detach (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 	
@@ -451,7 +451,7 @@
 	name:		"abyss",
 	id_table:	abyss_pci_tbl,
 	probe:		abyss_attach,
-	remove:		__devexit_p(abyss_detach),
+	remove:		abyss_detach,
 };
 
 static int __init abyss_init (void)
diff -urN linux-2.4.17-rc2/drivers/net/tokenring/tmspci.c linux/drivers/net/tokenring/tmspci.c
--- linux-2.4.17-rc2/drivers/net/tokenring/tmspci.c	Fri Dec 21 09:54:08 2001
+++ linux/drivers/net/tokenring/tmspci.c	Thu Sep 13 16:04:43 2001
@@ -220,7 +220,7 @@
 	return val;
 }
 
-static void __devexit tms_pci_detach (struct pci_dev *pdev)
+static void __exit tms_pci_detach (struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
 
@@ -238,7 +238,7 @@
 	name:		"tmspci",
 	id_table:	tmspci_pci_tbl,
 	probe:		tms_pci_attach,
-	remove:		__devexit_p(tms_pci_detach),
+	remove:		tms_pci_detach,
 };
 
 static int __init tms_pci_init (void)
diff -urN linux-2.4.17-rc2/drivers/net/wan/dscc4.c linux/drivers/net/wan/dscc4.c
--- linux-2.4.17-rc2/drivers/net/wan/dscc4.c	Fri Dec 21 09:54:08 2001
+++ linux/drivers/net/wan/dscc4.c	Fri Nov  9 13:41:42 2001
@@ -1634,7 +1634,7 @@
 	return &priv->stats;
 }
 
-static void __devexit dscc4_remove_one(struct pci_dev *pdev)
+static void __exit dscc4_remove_one(struct pci_dev *pdev)
 {
 	struct dscc4_pci_priv *ppriv;
 	struct net_device *root;
@@ -1752,7 +1752,7 @@
 	name:           "dscc4",
 	id_table:       dscc4_pci_tbl,
 	probe:          dscc4_init_one,
-	remove:         __devexit_p(dscc4_remove_one),
+	remove:         dscc4_remove_one,
 };
 
 static int __init dscc4_init_module(void)
diff -urN linux-2.4.17-rc2/fs/buffer.c linux/fs/buffer.c
--- linux-2.4.17-rc2/fs/buffer.c	Fri Dec 21 09:54:09 2001
+++ linux/fs/buffer.c	Fri Dec 21 09:54:13 2001
@@ -2327,7 +2327,7 @@
 	struct buffer_head *bh;
 
 	page = find_or_create_page(bdev->bd_inode->i_mapping, index, GFP_NOFS);
-	if (IS_ERR(page))
+	if (!page)
 		return NULL;
 
 	if (!PageLocked(page))
@@ -2432,7 +2432,7 @@
 	return 1;
 }
 
-static int sync_page_buffers(struct buffer_head *head, unsigned int gfp_mask)
+static int sync_page_buffers(struct buffer_head *head)
 {
 	struct buffer_head * bh = head;
 	int tryagain = 0;
@@ -2533,9 +2533,10 @@
 	/* Uhhuh, start writeback so that we don't end up with all dirty pages */
 	write_unlock(&hash_table_lock);
 	spin_unlock(&lru_list_lock);
+	gfp_mask = pf_gfp_mask(gfp_mask);
 	if (gfp_mask & __GFP_IO) {
 		if ((gfp_mask & __GFP_HIGHIO) || !PageHighMem(page)) {
-			if (sync_page_buffers(bh, gfp_mask)) {
+			if (sync_page_buffers(bh)) {
 				/* no IO or waiting next time */
 				gfp_mask = 0;
 				goto cleaned_buffers_try_again;
diff -urN linux-2.4.17-rc2/include/linux/mm.h linux/include/linux/mm.h
--- linux-2.4.17-rc2/include/linux/mm.h	Fri Dec 21 09:54:10 2001
+++ linux/include/linux/mm.h	Fri Dec 21 09:54:14 2001
@@ -548,6 +548,15 @@
 
 #define GFP_DMA		__GFP_DMA
 
+static inline unsigned int pf_gfp_mask(unsigned int gfp_mask)
+{
+	/* avoid all memory balancing I/O methods if this task cannot block on I/O */
+	if (current->flags & PF_NOIO)
+		gfp_mask &= ~(__GFP_IO | __GFP_HIGHIO | __GFP_FS);
+
+	return gfp_mask;
+}
+	
 /* vma is the first one with  address < vma->vm_end,
  * and even  address < vma->vm_start. Have to extend vma. */
 static inline int expand_stack(struct vm_area_struct * vma, unsigned long address)
diff -urN linux-2.4.17-rc2/mm/filemap.c linux/mm/filemap.c
--- linux-2.4.17-rc2/mm/filemap.c	Fri Dec 21 09:54:10 2001
+++ linux/mm/filemap.c	Fri Dec 21 09:54:14 2001
@@ -941,7 +941,7 @@
 	spin_unlock(&pagecache_lock);
 	if (!page) {
 		struct page *newpage = alloc_page(gfp_mask);
-		page = ERR_PTR(-ENOMEM);
+		page = NULL;
 		if (newpage) {
 			spin_lock(&pagecache_lock);
 			page = __find_lock_page_helper(mapping, index, *hash);
diff -urN linux-2.4.17-rc2/mm/vmscan.c linux/mm/vmscan.c
--- linux-2.4.17-rc2/mm/vmscan.c	Fri Dec 21 09:54:10 2001
+++ linux/mm/vmscan.c	Fri Dec 21 09:54:14 2001
@@ -588,6 +588,7 @@
 	int priority = DEF_PRIORITY;
 	int nr_pages = SWAP_CLUSTER_MAX;
 
+	gfp_mask = pf_gfp_mask(gfp_mask);
 	do {
 		nr_pages = shrink_caches(classzone, priority, gfp_mask, nr_pages);
 		if (nr_pages <= 0)
