tmp_suning_uos_patched/arch
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
..
alpha Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
arm26 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cris Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
frv Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
h8300 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i386 [PATCH] SMP alternatives: skip with UP kernels 2006-07-01 09:56:02 -07:00
ia64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
m32r Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
m68k Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
m68knommu Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mips Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
parisc Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
powerpc Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ppc Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
sh Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sh64 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
sparc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2006-06-30 15:40:35 -07:00
um [PATCH] uml: fix not_dead_yet when directory is in bad state 2006-07-01 09:56:03 -07:00
v850 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
x86_64 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
xtensa Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00