Commit 02c541ec authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] use new steal_locks helper

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.
parent 088f5d72
......@@ -645,6 +645,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
/* Discard our unneeded old files struct */
if (files) {
steal_locks(files);
put_files_struct(files);
files = NULL;
}
......
......@@ -808,6 +808,7 @@ int flush_old_exec(struct linux_binprm * bprm)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment