linux_dsm_epyc7002/arch/um/os-Linux
Paolo 'Blaisorblade' Giarrusso 912ad92220 [PATCH] uml: fix not_dead_yet when directory is in bad state
The bug occurred to me when a UML left an empty ~/.uml/Sarge-norm folder -
when trying to reuse not_dead_yet() failed one of its check.  The comment
says that's ok and means that we can take the directory, but while normally
not_dead_yet() removes it and returns 0 (i.e.  go on, use this), on failure
it returns 0 but forgets to remove it.  The fix is to remove it anytime
we're going to return 0.

But since "not_dead_yet" didn't make the interface so clear, causing this
bug, and I couldn't find a convenient name for the mix of things it did, I
split it into two parts:

is_umdir_used()      -	returns a boolean, contains all checks of not_dead_yet()
umdir_take_if_dead   -	tries to remove the dir unless it's used - returns
			whether it removed it, that is we now own it.

With this changes the control flow is IMHO a bit clearer and needs less
comment for control flow.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-01 09:56:03 -07:00
..
drivers [PATCH] uml: fix format errors 2006-04-11 06:18:36 -07:00
include Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
skas [PATCH] uml: error handling fixes 2006-05-01 18:17:44 -07:00
sys-i386 [PATCH] uml: error handling fixes 2006-05-01 18:17:44 -07:00
sys-x86_64 [PATCH] uml: error handling fixes 2006-05-01 18:17:44 -07:00
aio.c [PATCH] uml: Formatting changes 2006-01-06 08:33:45 -08:00
elf_aux.c [PATCH] uml makefiles sanitized 2005-09-29 08:46:26 -07:00
file.c [PATCH] uml: error handling fixes 2006-05-01 18:17:44 -07:00
helper.c [PATCH] uml: fix hang on run_helper() failure on uml_net 2006-04-11 06:18:36 -07:00
irq.c [PATCH] uml: remove NULL checks and add some CodingStyle 2006-05-01 18:17:44 -07:00
main.c [PATCH] uml: fix a typo in do_uml_initcalls 2006-06-05 12:29:17 -07:00
Makefile [PATCH] uml: implement {get,set}_thread_area for i386 2006-03-31 12:18:52 -08:00
mem.c [PATCH] uml: fix off-by-one bug in VM file creation 2006-06-30 11:25:37 -07:00
process.c [PATCH] uml: clean up after MADVISE_REMOVE 2006-05-01 18:17:44 -07:00
sigio.c [PATCH] uml: move outside spinlock call not needing it 2006-04-11 06:18:36 -07:00
signal.c [PATCH] uml: implement soft interrupts 2006-01-18 19:20:20 -08:00
start_up.c [PATCH] uml: physical memory map file fixes 2006-04-19 09:13:51 -07:00
time.c [PATCH] uml: fix wall_to_monotonic initialization 2006-06-05 12:29:17 -07:00
tls.c [PATCH] uml: check for differences in host support 2006-03-31 12:18:52 -08:00
trap.c [PATCH] uml: change sigjmp_buf to jmp_buf 2006-04-19 09:13:51 -07:00
tt.c [PATCH] uml: move libc-dependent irq code to os-Linux 2006-03-27 08:44:37 -08:00
tty_log.c [PATCH] uml: move tty logging to os-Linux 2006-03-27 08:44:38 -08:00
tty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
uaccess.c [PATCH] uml: change sigjmp_buf to jmp_buf 2006-04-19 09:13:51 -07:00
umid.c [PATCH] uml: fix not_dead_yet when directory is in bad state 2006-07-01 09:56:03 -07:00
user_syms.c [PATCH] uml: export symbols added by GCC hardened 2006-05-01 18:17:45 -07:00
util.c [PATCH] uml: change sigjmp_buf to jmp_buf 2006-04-19 09:13:51 -07:00