## Automatically generated incremental diff
## From:   linux-2.4.23-bk20
## To:     linux-2.4.23-bk21
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.4.23-bk20/Makefile linux-2.4.23-bk21/Makefile
--- linux-2.4.23-bk20/Makefile	2004-01-01 02:50:26.000000000 -0800
+++ linux-2.4.23-bk21/Makefile	2004-01-01 02:50:34.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 23
-EXTRAVERSION = -bk20
+EXTRAVERSION = -bk21
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.23-bk20/drivers/block/genhd.c linux-2.4.23-bk21/drivers/block/genhd.c
--- linux-2.4.23-bk20/drivers/block/genhd.c	2004-01-01 02:50:28.000000000 -0800
+++ linux-2.4.23-bk21/drivers/block/genhd.c	2004-01-01 02:50:35.000000000 -0800
@@ -201,7 +201,7 @@
 
 			disk_round_stats(hd);
 			seq_printf(s, "%4d  %4d %10d %s "
-				      "%u %u %u %u %u %u %u %u %u %u %u\n",
+				      "%u %u %u %u %u %u %u %u %d %u %u\n",
 				      gp->major, n, gp->sizes[n],
 				      disk_name(gp, n, buf),
 				      hd->rd_ios, hd->rd_merges,
diff -urN linux-2.4.23-bk20/drivers/ide/ide-iops.c linux-2.4.23-bk21/drivers/ide/ide-iops.c
--- linux-2.4.23-bk20/drivers/ide/ide-iops.c	2004-01-01 02:50:28.000000000 -0800
+++ linux-2.4.23-bk21/drivers/ide/ide-iops.c	2003-11-28 10:26:20.000000000 -0800
@@ -664,22 +664,12 @@
 	if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
 		local_irq_set(flags);
 		timeout += jiffies;
-		stat = hwif->INB(IDE_STATUS_REG);
-		while (stat & BUSY_STAT) {
+		while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
 			if (time_after(jiffies, timeout)) {
-				/*
-			       	 * do one more status read in case we were interrupted between last
-				 * stat = hwif->INB(IDE_STATUS_REG) and time_after(jiffies, timeout)
-				 * in wich case the timeout might have been shorter than specified.
-				 */
-				if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
-					local_irq_restore(flags);
-					*startstop = DRIVER(drive)->error(drive, "status timeout", stat);
-					return 1;
-				}
+				local_irq_restore(flags);
+				*startstop = DRIVER(drive)->error(drive, "status timeout", stat);
+				return 1;
 			}
-			else
-				stat = hwif->INB(IDE_STATUS_REG);
 		}
 		local_irq_restore(flags);
 	}
diff -urN linux-2.4.23-bk20/drivers/md/lvm-snap.c linux-2.4.23-bk21/drivers/md/lvm-snap.c
--- linux-2.4.23-bk20/drivers/md/lvm-snap.c	2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.23-bk21/drivers/md/lvm-snap.c	2004-01-01 02:50:35.000000000 -0800
@@ -44,6 +44,7 @@
  *    26/06/2002 - support for new list_move macro [patch@luckynet.dynu.com]
  *    26/07/2002 - removed conditional list_move macro because we will
  *                 discontinue LVM1 before 2.6 anyway
+ *    27/08/2003 - fixed unsafe list handling in lvm_find_exception_table() [HM]
  *
  */
 
@@ -114,7 +115,7 @@
 							     org_start,
 							     lv_t * lv)
 {
-	struct list_head *hash_table = lv->lv_snapshot_hash_table, *next;
+	struct list_head *hash_table = lv->lv_snapshot_hash_table, *next, *n;
 	unsigned long mask = lv->lv_snapshot_hash_mask;
 	int chunk_size = lv->lv_chunk_size;
 	lv_block_exception_t *ret;
@@ -123,8 +124,9 @@
 	hash_table =
 	    &hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
 	ret = NULL;
-	for (next = hash_table->next; next != hash_table;
-	     next = next->next) {
+
+	for (next = hash_table->next, n = next->next; next != hash_table;
+             next = n, n = next->next) {
 		lv_block_exception_t *exception;
 
 		exception = list_entry(next, lv_block_exception_t, hash);
diff -urN linux-2.4.23-bk20/drivers/md/lvm.c linux-2.4.23-bk21/drivers/md/lvm.c
--- linux-2.4.23-bk20/drivers/md/lvm.c	2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.23-bk21/drivers/md/lvm.c	2004-01-01 02:50:35.000000000 -0800
@@ -2594,8 +2594,9 @@
 				      new_lv->lv_block_exception[e].
 				      rsector_org, new_lv);
 
-		vg_ptr->pe_allocated -= old_lv->lv_allocated_le;
+		vg_ptr->pe_allocated -= old_lv->lv_allocated_snapshot_le;
 		vg_ptr->pe_allocated += new_lv->lv_allocated_le;
+		old_lv->lv_allocated_snapshot_le = new_lv->lv_allocated_le;
 	} else {
 		vfree(old_lv->lv_current_pe);
 		vfree(old_lv->lv_snapshot_hash_table);
diff -urN linux-2.4.23-bk20/fs/readdir.c linux-2.4.23-bk21/fs/readdir.c
--- linux-2.4.23-bk20/fs/readdir.c	2002-08-02 17:39:45.000000000 -0700
+++ linux-2.4.23-bk21/fs/readdir.c	2004-01-01 02:50:35.000000000 -0800
@@ -69,6 +69,7 @@
 			loff_t n = file->f_pos - 2;
 
 			spin_lock(&dcache_lock);
+			list_del(&cursor->d_child);
 			p = file->f_dentry->d_subdirs.next;
 			while (n && p != &file->f_dentry->d_subdirs) {
 				struct dentry *next;
@@ -77,7 +78,6 @@
 					n--;
 				p = p->next;
 			}
-			list_del(&cursor->d_child);
 			list_add_tail(&cursor->d_child, p);
 			spin_unlock(&dcache_lock);
 		}
diff -urN linux-2.4.23-bk20/include/linux/lvm.h linux-2.4.23-bk21/include/linux/lvm.h
--- linux-2.4.23-bk20/include/linux/lvm.h	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.23-bk21/include/linux/lvm.h	2004-01-01 02:50:36.000000000 -0800
@@ -80,8 +80,8 @@
 #ifndef _LVM_H_INCLUDE
 #define _LVM_H_INCLUDE
 
-#define LVM_RELEASE_NAME "1.0.7"
-#define LVM_RELEASE_DATE "28/03/2003"
+#define LVM_RELEASE_NAME "1.0.8"
+#define LVM_RELEASE_DATE "17/11/2003"
 
 #define	_LVM_KERNEL_H_VERSION	"LVM "LVM_RELEASE_NAME" ("LVM_RELEASE_DATE")"
 
diff -urN linux-2.4.23-bk20/mm/mmap.c linux-2.4.23-bk21/mm/mmap.c
--- linux-2.4.23-bk20/mm/mmap.c	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.23-bk21/mm/mmap.c	2004-01-01 02:50:36.000000000 -0800
@@ -14,6 +14,7 @@
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/personality.h>
+#include <linux/mount.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
@@ -400,8 +401,13 @@
 	int error;
 	rb_node_t ** rb_link, * rb_parent;
 
-	if (file && (!file->f_op || !file->f_op->mmap))
-		return -ENODEV;
+	if (file) {
+		if (!file->f_op || !file->f_op->mmap)
+			return -ENODEV;
+
+		if ((prot & PROT_EXEC) && (file->f_vfsmnt->mnt_flags & MNT_NOEXEC))
+			return -EPERM;
+	}
 
 	if (!len)
 		return addr;
