kernel-fxtec-pro1x/include
Al Viro 7b7b1ace2d [PATCH] saner handling of auto_acct_off() and DQUOT_OFF() in umount
The way we currently deal with quota and process accounting that might
keep vfsmount busy at umount time is inherently broken; we try to turn
them off just in case (not quite correctly, at that) and

  a) pray umount doesn't fail (otherwise they'll stay turned off)
  b) pray nobody doesn anything funny just as we turn quota off

Moreover, LSM provides hooks for doing the same sort of broken logics.

The proper way to deal with that is to introduce the second kind of
reference to vfsmount.  Semantics:

 - when the last normal reference is dropped, all special ones are
   converted to normal ones and if there had been any, cleanup is done.
 - normal reference can be cloned into a special one
 - special reference can be converted to normal one; that's a no-op if
   we'd already passed the point of no return (i.e.  mntput() had
   converted special references to normal and started cleanup).

The way it works: e.g. starting process accounting converts the vfsmount
reference pinned by the opened file into special one and turns it back
to normal when it gets shut down; acct_auto_close() is done when no
normal references are left.  That way it does *not* obstruct umount(2)
and it silently gets turned off when the last normal reference to
vfsmount is gone.  Which is exactly what we want...

The same should be done by LSM module that holds some internal
references to vfsmount and wants to shut them down on umount - it should
make them special and security_sb_umount_close() will be called exactly
when the last normal reference to vfsmount is gone.

quota handling is even simpler - we don't use normal file IO anymore, so
there's no need to hold vfsmounts at all.  DQUOT_OFF() is done from
deactivate_super(), where it really belongs.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 18:18:09 -08:00
..
acpi
asm-alpha [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
asm-arm [ARM SMP] Add Realview MPcore SMP support 2005-11-07 21:05:42 +00:00
asm-arm26 [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
asm-cris [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-frv [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-generic [PATCH] RapidIO support: core base 2005-11-07 07:53:46 -08:00
asm-h8300 [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
asm-i386 [PATCH] Kprobes: Track kprobe on a per_cpu basis - i386 changes 2005-11-07 07:53:45 -08:00
asm-ia64 [PATCH] Kprobes: Track kprobe on a per_cpu basis - ia64 changes 2005-11-07 07:53:45 -08:00
asm-m32r [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
asm-m68k [PATCH] semaphore: Remove __MUTEX_INITIALIZER() 2005-10-30 17:37:27 -08:00
asm-m68knommu [PATCH] m68knommu: move some platform irq support out of irq.h 2005-11-07 08:00:47 -08:00
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2005-11-07 11:15:23 -08:00
asm-parisc [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-powerpc [PATCH] Kprobes: Track kprobe on a per_cpu basis - ppc64 changes 2005-11-07 07:53:45 -08:00
asm-ppc [PATCH] RapidIO support: ppc32 2005-11-07 07:53:47 -08:00
asm-ppc64 [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-s390 [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
asm-sh [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-sh64 [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
asm-sparc [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
asm-sparc64 [PATCH] Kprobes: Track kprobe on a per_cpu basis - sparc64 changes 2005-11-07 07:53:46 -08:00
asm-um [PATCH] uml: maintain own LDT entries 2005-11-07 07:53:31 -08:00
asm-v850 [PATCH] include/asm-v850/ "extern inline" -> "static inline" 2005-11-07 07:53:32 -08:00
asm-x86_64 [PATCH] Kprobes: Track kprobe on a per_cpu basis - x86_64 changes 2005-11-07 07:53:46 -08:00
asm-xtensa [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
keys [PATCH] Keys: Export user-defined keyring operations 2005-10-30 17:37:22 -08:00
linux [PATCH] saner handling of auto_acct_off() and DQUOT_OFF() in umount 2005-11-07 18:18:09 -08:00
math-emu
media
mtd [MTD] user-abi: Clean up trailing white spaces 2005-11-07 14:43:11 +01:00
net Merge branch 'red' of 84.73.165.173:/home/tgr/repos/net-2.6 2005-11-05 22:30:29 -02:00
pcmcia [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
rdma [IB] ucm: 32/64 compatibility fixes 2005-11-01 13:18:54 -08:00
rxrpc
scsi Merge by Hand 2005-11-04 22:29:52 -06:00
sound [ALSA] version 1.0.10rc3 2005-11-07 14:35:14 +01:00
video