From: Chris Wright <chrisw@osdl.org>

Use the new steal_locks helper to steal the locks from the old files struct
left from unshare_files() when the new unshared struct files gets used.



 25-akpm/fs/binfmt_elf.c |    1 +
 25-akpm/fs/exec.c       |    1 +
 2 files changed, 2 insertions(+)

diff -puN fs/binfmt_elf.c~use-steal_locks fs/binfmt_elf.c
--- 25/fs/binfmt_elf.c~use-steal_locks	Thu Dec 18 13:57:29 2003
+++ 25-akpm/fs/binfmt_elf.c	Thu Dec 18 13:57:29 2003
@@ -645,6 +645,7 @@ static int load_elf_binary(struct linux_
 
 	/* Discard our unneeded old files struct */
 	if (files) {
+		steal_locks(files);
 		put_files_struct(files);
 		files = NULL;
 	}
diff -puN fs/exec.c~use-steal_locks fs/exec.c
--- 25/fs/exec.c~use-steal_locks	Thu Dec 18 13:57:29 2003
+++ 25-akpm/fs/exec.c	Thu Dec 18 13:57:29 2003
@@ -808,6 +808,7 @@ int flush_old_exec(struct linux_binprm *
 	bprm->mm = NULL;		/* We're using it now */
 
 	/* This is the point of no return */
+	steal_locks(files);
 	put_files_struct(files);
 
 	current->sas_ss_sp = current->sas_ss_size = 0;

_