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

diff -urN linux-2.4.21-bk31/CREDITS linux-2.4.21-bk32/CREDITS
--- linux-2.4.21-bk31/CREDITS	2003-08-13 02:54:37.000000000 -0700
+++ linux-2.4.21-bk32/CREDITS	2003-08-13 02:54:43.000000000 -0700
@@ -1943,7 +1943,7 @@
 S: Canada B3J 3C8
 
 N: Kai Mäkisara
-E: Kai.Makisara@metla.fi
+E: Kai.Makisara@kolumbus.fi
 D: SCSI Tape Driver
 
 N: Dan Malek
diff -urN linux-2.4.21-bk31/MAINTAINERS linux-2.4.21-bk32/MAINTAINERS
--- linux-2.4.21-bk31/MAINTAINERS	2003-08-13 02:54:37.000000000 -0700
+++ linux-2.4.21-bk32/MAINTAINERS	2003-08-13 02:54:43.000000000 -0700
@@ -1585,7 +1585,7 @@
 
 SCSI TAPE DRIVER
 P:	Kai Mäkisara
-M:	Kai.Makisara@metla.fi
+M:	Kai.Makisara@kolumbus.fi
 L:	linux-scsi@vger.kernel.org
 S:	Maintained
 
diff -urN linux-2.4.21-bk31/Makefile linux-2.4.21-bk32/Makefile
--- linux-2.4.21-bk31/Makefile	2003-08-13 02:54:37.000000000 -0700
+++ linux-2.4.21-bk32/Makefile	2003-08-13 02:54:43.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 21
-EXTRAVERSION = -bk31
+EXTRAVERSION = -bk32
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.21-bk31/arch/alpha/lib/ev6-stxncpy.S linux-2.4.21-bk32/arch/alpha/lib/ev6-stxncpy.S
--- linux-2.4.21-bk31/arch/alpha/lib/ev6-stxncpy.S	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.21-bk32/arch/alpha/lib/ev6-stxncpy.S	2003-08-13 02:54:43.000000000 -0700
@@ -360,9 +360,9 @@
 	lda	t2, -1		# E : for creating masks later
 	beq	t12, $u_head	# U : (stall)
 
-	nop
-	cmpbge	zero, t1, t8	# E : is there a zero?
 	extql	t2, a1, t2	# U :
+	cmpbge	zero, t1, t8	# E : is there a zero?
+	andnot	t2, t6, t12	# E : dest mask for a single word copy
 	or	t8, t10, t5	# E : test for end-of-count too
 
 	cmpbge	zero, t2, t3	# E :
@@ -379,13 +379,13 @@
 	negq	t8, t6		# E : build bitmask of bytes <= zero
 	mskqh	t1, t4, t1	# U :
 
-	and	t6, t8, t12	# E :
-	subq	t12, 1, t6	# E : (stall)
-	or	t6, t12, t8	# E : (stall)
-	zapnot	t2, t8, t2	# U : prepare source word; mirror changes (stall)
+	and	t6, t8, t2	# E :
+	subq	t2, 1, t6	# E : (stall)
+	or	t6, t2, t8	# E : (stall)
+	zapnot	t12, t8, t12	# U : prepare source word; mirror changes (stall)
 
 	zapnot	t1, t8, t1	# U : to source validity mask
-	andnot	t0, t2, t0	# E : zero place for source to reside
+	andnot	t0, t12, t0	# E : zero place for source to reside
 	or	t0, t1, t0	# E : and put it there (stall both t0, t1)
 	stq_u	t0, 0(a0)	# L : (stall)
 
diff -urN linux-2.4.21-bk31/arch/alpha/lib/stxncpy.S linux-2.4.21-bk32/arch/alpha/lib/stxncpy.S
--- linux-2.4.21-bk31/arch/alpha/lib/stxncpy.S	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.21-bk32/arch/alpha/lib/stxncpy.S	2003-08-13 02:54:43.000000000 -0700
@@ -313,9 +313,9 @@
 	lda	t2, -1		# e0    : for creating masks later
 	beq	t12, $u_head	# .. e1 :
 
-	nop			# e0    :
-	cmpbge	zero, t1, t8	# .. e1 : is there a zero?
 	extql	t2, a1, t2	# e0    :
+	cmpbge	zero, t1, t8	# .. e1 : is there a zero?
+	andnot	t2, t6, t12	# e0    : dest mask for a single word copy
 	or	t8, t10, t5	# .. e1 : test for end-of-count too
 	cmpbge	zero, t2, t3	# e0    :
 	cmoveq	a2, t5, t8	# .. e1 :
@@ -330,14 +330,14 @@
 	ldq_u	t0, 0(a0)	# e0    :
 	negq	t8, t6		# .. e1 : build bitmask of bytes <= zero
 	mskqh	t1, t4, t1	# e0    :
-	and	t6, t8, t12	# .. e1 :
-	subq	t12, 1, t6	# e0    :
-	or	t6, t12, t8	# e1    :
+	and	t6, t8, t2	# .. e1 :
+	subq	t2, 1, t6	# e0    :
+	or	t6, t2, t8	# e1    :
 
-	zapnot	t2, t8, t2	# e0    : prepare source word; mirror changes
+	zapnot	t12, t8, t12	# e0    : prepare source word; mirror changes
 	zapnot	t1, t8, t1	# .. e1 : to source validity mask
 
-	andnot	t0, t2, t0	# e0    : zero place for source to reside
+	andnot	t0, t12, t0	# e0    : zero place for source to reside
 	or	t0, t1, t0	# e1    : and put it there
 	stq_u	t0, 0(a0)	# e0    :
 	ret	(t9)		# .. e1 :
diff -urN linux-2.4.21-bk31/fs/binfmt_elf.c linux-2.4.21-bk32/fs/binfmt_elf.c
--- linux-2.4.21-bk31/fs/binfmt_elf.c	2003-08-13 02:54:40.000000000 -0700
+++ linux-2.4.21-bk32/fs/binfmt_elf.c	2003-08-13 02:54:46.000000000 -0700
@@ -444,7 +444,7 @@
 	struct elfhdr interp_elf_ex;
   	struct exec interp_ex;
 	char passed_fileno[6];
-	struct files_struct *files, *ftmp;
+	struct files_struct *files;
 	
 	/* Get the exec-header */
 	elf_ex = *((struct elfhdr *) bprm->buf);
@@ -480,7 +480,10 @@
 	files = current->files;		/* Refcounted so ok */
 	if(unshare_files() < 0)
 		goto out_free_ph;
-	steal_locks(files, current->files);
+	if (files == current->files) {
+		put_files_struct(files);
+		files = NULL;
+	}
 
 	/* exec will make our files private anyway, but for the a.out
 	   loader stuff we need to do it earlier */
@@ -603,7 +606,11 @@
 		goto out_free_dentry;
 
 	/* Discard our unneeded old files struct */
-	put_files_struct(files);
+	if (files) {
+		steal_locks(files);
+		put_files_struct(files);
+		files = NULL;
+	}
 
 	/* OK, This is the point of no return */
 	current->mm->start_data = 0;
@@ -714,18 +721,16 @@
 			elf_entry = load_elf_interp(&interp_elf_ex,
 						    interpreter,
 						    &interp_load_addr);
-
-		allow_write_access(interpreter);
-		fput(interpreter);
-		kfree(elf_interpreter);
-
 		if (BAD_ADDR(elf_entry)) {
 			printk(KERN_ERR "Unable to load interpreter\n");
-			kfree(elf_phdata);
 			send_sig(SIGSEGV, current, 0);
 			retval = -ENOEXEC; /* Nobody gets to see this, but.. */
-			goto out;
+			goto out_free_dentry;
 		}
+
+		allow_write_access(interpreter);
+		fput(interpreter);
+		kfree(elf_interpreter);
 	}
 
 	kfree(elf_phdata);
@@ -811,10 +816,10 @@
 out_free_file:
 	sys_close(elf_exec_fileno);
 out_free_fh:
-	ftmp = current->files;
-	current->files = files;
-	steal_locks(ftmp, current->files);
-	put_files_struct(ftmp);
+	if (files) {
+		put_files_struct(current->files);
+		current->files = files;
+	}
 out_free_ph:
 	kfree(elf_phdata);
 	goto out;
diff -urN linux-2.4.21-bk31/fs/exec.c linux-2.4.21-bk32/fs/exec.c
--- linux-2.4.21-bk31/fs/exec.c	2003-08-13 02:54:40.000000000 -0700
+++ linux-2.4.21-bk32/fs/exec.c	2003-08-13 02:54:46.000000000 -0700
@@ -582,8 +582,6 @@
 	retval = unshare_files();
 	if(retval)
 		goto flush_failed;
-	steal_locks(files, current->files);
-	put_files_struct(files);
 	
 	/* 
 	 * Release all of the old mmap stuff
@@ -592,6 +590,8 @@
 	if (retval) goto mmap_failed;
 
 	/* This is the point of no return */
+	steal_locks(files);
+	put_files_struct(files);
 	release_old_signals(oldsig);
 
 	current->sas_ss_sp = current->sas_ss_size = 0;
@@ -629,6 +629,8 @@
 	return 0;
 
 mmap_failed:
+	put_files_struct(current->files);
+	current->files = files;
 flush_failed:
 	spin_lock_irq(&current->sigmask_lock);
 	if (current->sig != oldsig) {
diff -urN linux-2.4.21-bk31/fs/locks.c linux-2.4.21-bk32/fs/locks.c
--- linux-2.4.21-bk31/fs/locks.c	2003-08-13 02:54:40.000000000 -0700
+++ linux-2.4.21-bk32/fs/locks.c	2003-08-13 02:54:46.000000000 -0700
@@ -1937,11 +1937,11 @@
 	return length;
 }
 
-void steal_locks(fl_owner_t from, fl_owner_t to)
+void steal_locks(fl_owner_t from)
 {
 	struct list_head *tmp;
 
-	if (from == to)
+	if (from == current->files)
 		return;
 
 	lock_kernel();
@@ -1949,7 +1949,7 @@
 		struct file_lock *fl = list_entry(tmp, struct file_lock,
 						  fl_link);
 		if (fl->fl_owner == from)
-			fl->fl_owner = to;
+			fl->fl_owner = current->files;
 	}
 	unlock_kernel();
 }
diff -urN linux-2.4.21-bk31/fs/ncpfs/inode.c linux-2.4.21-bk32/fs/ncpfs/inode.c
--- linux-2.4.21-bk31/fs/ncpfs/inode.c	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.21-bk32/fs/ncpfs/inode.c	2003-08-13 02:54:46.000000000 -0700
@@ -651,7 +651,7 @@
 	if ((attr->ia_valid & ATTR_ATIME) != 0) {
 		__u16 dummy;
 		info_mask |= (DM_LAST_ACCESS_DATE);
-		ncp_date_unix2dos(attr->ia_ctime,
+		ncp_date_unix2dos(attr->ia_atime,
 				  &(dummy), &(info.lastAccessDate));
 		info.lastAccessDate = le16_to_cpu(info.lastAccessDate);
 	}
diff -urN linux-2.4.21-bk31/include/linux/fs.h linux-2.4.21-bk32/include/linux/fs.h
--- linux-2.4.21-bk31/include/linux/fs.h	2003-08-13 02:54:41.000000000 -0700
+++ linux-2.4.21-bk32/include/linux/fs.h	2003-08-13 02:54:47.000000000 -0700
@@ -674,7 +674,7 @@
 extern time_t lease_get_mtime(struct inode *);
 extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
 extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
-extern void steal_locks(fl_owner_t from, fl_owner_t to);
+extern void steal_locks(fl_owner_t from);
 
 struct fasync_struct {
 	int	magic;
