pandora-kernel.git
16 years agospi core: stop updating dev->power.power_state
David Brownell [Wed, 6 Feb 2008 09:38:10 +0000 (01:38 -0800)]
spi core: stop updating dev->power.power_state

Don't update dev->power.power_state any more in the SPI core.  The only
reason to update this scheduled-to-be-removed field was to make the
already-removed /sys/devices/.../power/state files work better.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAtari floppy: Rename disk_type to atari_disk_type
Geert Uytterhoeven [Wed, 6 Feb 2008 09:38:09 +0000 (01:38 -0800)]
Atari floppy: Rename disk_type to atari_disk_type

Commit edfaa7c36574f1bf09c65ad602412db9da5f96bf

    Driver core: convert block from raw kobjects to core devices

    This moves the block devices to /sys/class/block. It will create a
    flat list of all block devices, with the disks and partitions in one
    directory. For compatibility /sys/block is created and contains symlinks
    to the disks.

introduced a global disk_type variable in <linux/genhd.h>, causing the
following compile error on Atari:

    drivers/block/ataflop.c:93: error: conflicting types for 'disk_type'
    include/linux/genhd.h:21: error: previous declaration of 'disk_type' was here

Rename the local disk_type variable in drivers/block/ataflop.c to
atari_disk_type, to avoid the conflict.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoW1: w1_therm.c standardize units to millidegrees C
David Fries [Wed, 6 Feb 2008 09:38:09 +0000 (01:38 -0800)]
W1: w1_therm.c standardize units to millidegrees C

Standardize the temperature units to millidegrees C for the two sensor
conversion routines.  Previously the routines were,

w1_DS18B20_convert_temp degrees C
w1_DS18S20_convert_temp millidegrees C

Unfortunately this will break any program using the ds18b20 value as it
will now be 1000 times bigger.  Fortunately there can't be that many users
out there, or some of these bugs will have been fixed by now, such as the
negative C error (see previous patch) that makes me think the ds18b20 is
the better choice to change because of the current bugs.

Signed-off-by: David Fries <david@fries.net>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/cdrom/cdrom.c: simplify logic in cdrom_release()
Borislav Petkov [Wed, 6 Feb 2008 09:38:08 +0000 (01:38 -0800)]
drivers/cdrom/cdrom.c: simplify logic in cdrom_release()

Simplify logic in cdrom_release() without semantic change.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agow1: remove unused and confusing variable.
Evgeniy Polyakov [Wed, 6 Feb 2008 09:38:07 +0000 (01:38 -0800)]
w1: remove unused and confusing variable.

Remvoe variable which actually is not used (except assigning it a value)
and confusing break out of the family checking loop.  Found by Harry Mason.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Harry J Mason <hjm03r@ecs.soton.ac.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotpm: infineon section mismatch
Randy Dunlap [Wed, 6 Feb 2008 09:38:06 +0000 (01:38 -0800)]
tpm: infineon section mismatch

Fix section mismatch by making the driver template variable name
match one of the whitelisted variable names in modpost.

WARNING: vmlinux.o(.data+0x7a9e8): Section mismatch: reference to .init.text:tpm_inf_pnp_probe (between 'tpm_inf_pnp' and 'cn_idx')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Marcel Selhorst <tpm@selhorst.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospeed up jiffies conversion functions if HZ==USER_HZ
Andrew Morton [Wed, 6 Feb 2008 09:38:06 +0000 (01:38 -0800)]
speed up jiffies conversion functions if HZ==USER_HZ

Avoid calling do_div(x, 1) in this case.

Cc: David Fries <david@fries.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosystem timer: fix crash in <100Hz system timer
David Fries [Wed, 6 Feb 2008 09:38:04 +0000 (01:38 -0800)]
system timer: fix crash in <100Hz system timer

The kernel has a divide by zero crash when trying to run the system timer
less than 100Hz.  The problem is x/(HZ/USER_HZ) and related.  Now
x*(USER_HZ/HZ) will be used if HZ<USER_HZ.

I'm running the Linux kernel under qemu and went to run a slower system
timer to take less CPU (and battery) on the host.  I found that the kernel
paniced under emulation because of a divide by zero in three places.  Here
is the patch.  The base git was updated today 01-05-2008.  I went for a
20Hz system time by adding config HZ_20 etc to kernel/Kconfig.hz.  With
this patch I verified the system timer by looking at /proc/interrupts.

[akpm@linux-foundation.org: partially clean up the macro maze]
Signed-off-by: David Fries <david@fries.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agophantom: don't grab other devices
Jiri Slaby [Wed, 6 Feb 2008 09:38:03 +0000 (01:38 -0800)]
phantom: don't grab other devices

Specify also sub pci ids to not grab devices with properly set sub ids.
This devices has these set (unset) to the same as (plx 9050) ids.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Andreas Block <andreas.block@esd-electronics.com>
Cc: Oliver Thimm <oliver.thimm@esd-electronics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoClaim maintainership for block2mtd and update email addresses
Joern Engel [Wed, 6 Feb 2008 09:38:02 +0000 (01:38 -0800)]
Claim maintainership for block2mtd and update email addresses

I have been prime author and maintainer of block2mtd from day one, but
neither MAINTAINERS nor the module source makes this fact clear.  And while
I'm at it, update my email addresses tree-wide, as the old address
currently bounces and change my name to "joern" as unicode will likely
continue to cause trouble until the end of this century.

Signed-off-by: Joern Engel <joern@lazybastard.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocumentation: add hint about call traces & module symbols to BUG-HUNTING
Richard Kennedy [Wed, 6 Feb 2008 09:38:01 +0000 (01:38 -0800)]
Documentation: add hint about call traces & module symbols to BUG-HUNTING

Here's a couple of small additions to BUG-HUNTING.

1. point out that you can list code in gdb with only one command
(gdb) l *(<symbol> + offset)

2. give a very brief hint how to decode module symbols in call traces

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake sys_poll() wait at least timeout ms
Karsten Wiese [Wed, 6 Feb 2008 09:37:59 +0000 (01:37 -0800)]
make sys_poll() wait at least timeout ms

schedule_timeout(jiffies) waits for at least jiffies - 1.  Add 1 jiffie to
the timeout_jiffies calculated in sys_poll() to wait at least
timeout_msecs, like poll() manpage says.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix IXANY and restart after signal (e.g. ctrl-C) in n_tty line discipline
Joe Peterson [Wed, 6 Feb 2008 09:37:59 +0000 (01:37 -0800)]
Fix IXANY and restart after signal (e.g. ctrl-C) in n_tty line discipline

Fix two N_TTY line discipline issues related to resuming a stopped TTY
(typically done with ctrl-S):

1) Fix handling of character that resumes a stopped TTY (with IXANY)

With "stty ixany", the TTY line discipline would lose the first character
after the stop, so typing, for example, "hi^Sthere" resulted in "hihere"
(the 't' would cause the resume after ^S, but it would then be thrown away
rather than processed as an input character).  This was inconsistent with
the behavior of other Unix systems.

2) Fix interrupt signal (e.g. ctrl-C) behavior in stopped TTYs

With "stty -ixany" (often the default), interrupt signals were ignored
in a stopped TTY until the TTY was resumed with the start char (typically
ctrl-Q), which was inconsistent with the behavior of other Unix systems.

Signed-off-by: Joe Peterson <joe@skyrush.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocs: convert kref semaphore to mutex
Daniel Walker [Wed, 6 Feb 2008 09:37:58 +0000 (01:37 -0800)]
docs: convert kref semaphore to mutex

Just converting this documentation semaphore reference, since we don't
want to promote semaphore usage.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Corey Minyard <minyard@acm.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoUse ilog2() in fs/namespace.c
Eric Dumazet [Wed, 6 Feb 2008 09:37:57 +0000 (01:37 -0800)]
Use ilog2() in fs/namespace.c

We can use ilog2() in fs/namespace.c to compute hash_bits and hash_mask at
compile time, not runtime.

[akpm@linux-foundation.org: clean it all up]
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodebug_smp_processor_id() fixlets
Andrew Morton [Wed, 6 Feb 2008 09:37:57 +0000 (01:37 -0800)]
debug_smp_processor_id() fixlets

- Account for debug_smp_processor_id()'s own preempt_disable() when
  displaying the preempt_count().

- 80 cols, not 800.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/sys.c: get rid of expensive divides in groups_sort()
Eric Dumazet [Wed, 6 Feb 2008 09:37:56 +0000 (01:37 -0800)]
kernel/sys.c: get rid of expensive divides in groups_sort()

groups_sort() can be quite long if user loads a large gid table.

This is because GROUP_AT(group_info, some_integer) uses an integer divide.
So having to do XXX thousand divides during one syscall can lead to very
high latencies.  (NGROUPS_MAX=65536)

In the past (25 Mar 2006), an analog problem was found in groups_search()
(commit d74beb9f33a5f16d2965f11b275e401f225c949d ) and at that time I
changed some variables to unsigned int.

I believe that a more generic fix is to make sure NGROUPS_PER_BLOCK is
unsigned.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoidle_regs() must be __cpuinit
Adrian Bunk [Wed, 6 Feb 2008 09:37:55 +0000 (01:37 -0800)]
idle_regs() must be __cpuinit

Fix the following section mismatch with CONFIG_HOTPLUG=n,
CONFIG_HOTPLUG_CPU=y:

WARNING: vmlinux.o(.text+0x399a6): Section mismatch: reference to .init.text.5:idle_regs (between 'fork_idle' and 'get_task_mm')

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocalibrate_delay() must be __cpuinit
Adrian Bunk [Wed, 6 Feb 2008 09:37:51 +0000 (01:37 -0800)]
calibrate_delay() must be __cpuinit

calibrate_delay() must be __cpuinit, not __{dev,}init.

I've verified that this is correct for all users.

While doing the latter, I also did the following cleanups:
- remove pointless additional prototypes in C files
- ensure all users #include <linux/delay.h>

This fixes the following section mismatches with CONFIG_HOTPLUG=n,
CONFIG_HOTPLUG_CPU=y:

WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christian Zankel <chris@zankel.net>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/params.c: remove sparse-warning (different signedness)
Richard Knutsson [Wed, 6 Feb 2008 09:37:50 +0000 (01:37 -0800)]
kernel/params.c: remove sparse-warning (different signedness)

Fixing:
  CHECK   kernel/params.c
kernel/params.c:329:41: warning: incorrect type in argument 8 (different signedness)
kernel/params.c:329:41:    expected int *num
kernel/params.c:329:41:    got unsigned int *

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolib/extable.c: remove an expensive integer divide in search_extable()
Eric Dumazet [Wed, 6 Feb 2008 09:37:49 +0000 (01:37 -0800)]
lib/extable.c: remove an expensive integer divide in search_extable()

Actual code let compiler generates idiv instruction on x86.

Using a right shift is OK here and readable as well.

Before patch
   10:   57                      push   %edi
   11:   56                      push   %esi
   12:   89 d6                   mov    %edx,%esi
   14:   53                      push   %ebx
   15:   89 c3                   mov    %eax,%ebx
   17:   eb 22                   jmp    3b <search_extable+0x2b>
   19:   89 f0                   mov    %esi,%eax
   1b:   ba 02 00 00 00          mov    $0x2,%edx
   20:   29 d8                   sub    %ebx,%eax
   22:   89 d7                   mov    %edx,%edi
   24:   c1 f8 03                sar    $0x3,%eax
   27:   99                      cltd
   28:   f7 ff                   idiv   %edi
   2a:   8d 04 c3                lea    (%ebx,%eax,8),%eax
   2d:   39 08                   cmp    %ecx,(%eax)
...

After patch

00000010 <search_extable>:
   10:   53                      push   %ebx
   11:   89 c3                   mov    %eax,%ebx
   13:   eb 18                   jmp    2d <search_extable+0x1d>
   15:   89 d0                   mov    %edx,%eax
   17:   29 d8                   sub    %ebx,%eax
   19:   c1 f8 04                sar    $0x4,%eax
   1c:   8d 04 c3                lea    (%ebx,%eax,8),%eax
   1f:   39 08                   cmp    %ecx,(%eax)
...

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoparport_pc: detection for SuperIO IT87XX POST
Petr Cvek [Wed, 6 Feb 2008 09:37:48 +0000 (01:37 -0800)]
parport_pc: detection for SuperIO IT87XX POST

Add detection for IT87XX SuperIO chip and disabling its POST feature, which
made noise on parallel port's pins.

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoik8: add Dell UK 6400 Inspiron model (MM061)
Nick Warne [Wed, 6 Feb 2008 09:37:47 +0000 (01:37 -0800)]
ik8: add Dell UK 6400 Inspiron model (MM061)

Add the Dell UK 6400 Inspiron model (MM061) to allow the i8k module to load
correctly without using 'force=1'

Signed-off-by: "Nick Warne" <nick@ukfsn.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopartition: use DEFAULT_SGI_PARTITION for SGI_PARTION default
Thomas Bogendoerfer [Wed, 6 Feb 2008 09:37:46 +0000 (01:37 -0800)]
partition: use DEFAULT_SGI_PARTITION for SGI_PARTION default

Use DEFAULT_SGI_PARTITION for SGI_PARTION default

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoparport_serial: netmos 9855 fix
Christian Pellegrin [Wed, 6 Feb 2008 09:37:44 +0000 (01:37 -0800)]
parport_serial: netmos 9855 fix

Fix wrong netmos 9855 serial port configuration.

On loading only one serial port was present and it wasn't working.  After
looking in the data sheet I realized that the base address was wrong.  For
further reference here is lspci and relevant dmesg output:

02:00.0 Communication controller: NetMos Technology PCI 9855 Multi-I/O
Controller (rev 01) (prog-if 02)
        Subsystem: LSI Logic / Symbios Logic Unknown device 0022
        Flags: medium devsel, IRQ 19
        I/O ports at df00 [size=8]
        I/O ports at de00 [size=8]
        I/O ports at dd00 [size=8]
        I/O ports at dc00 [size=8]
        I/O ports at db00 [size=8]
        I/O ports at da00 [size=16]

parport1: PC-style at 0xdd00 [PCSPP,TRISTATE]
parport2: PC-style at 0xdf00 [PCSPP,TRISTATE,EPP]
0000:02:00.0: ttyS0 at I/O 0xdb00 (irq = 19) is a 16550A
0000:02:00.0: ttyS1 at I/O 0xda00 (irq = 19) is a 16550A

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Cc: Thomas Richter <thor@math.TU-Berlin.DE>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Martin Schitter <ms@gewi.kfunigraz.ac.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoparport: add support for the Quatech SPPXP-100 Parallel port PCI ExpressCard
Luís P Mendes [Wed, 6 Feb 2008 09:37:43 +0000 (01:37 -0800)]
parport: add support for the Quatech SPPXP-100 Parallel port PCI ExpressCard

Added pci device id for the Quatech SPPXP-100 ExpressCard - 0x278 - to
include/linux/pci_id.h

Modified drivers/parport/parport_pc.c to support the Quatech SPPXP-100 Parallel port PCI ExpressCard

[akpm@linux-foundation.org: build fix]
Signed-off-by: Luís P Mendes <luis.p.mendes@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoext2: xip check fix
Nick Piggin [Wed, 6 Feb 2008 09:37:42 +0000 (01:37 -0800)]
ext2: xip check fix

ext2 should not worry about checking sb->s_blocksize for XIP before the
sb's blocksize actually gets set.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAmiga serial driver: port_write_mutex fixup
Daniel Walker [Wed, 6 Feb 2008 09:37:41 +0000 (01:37 -0800)]
Amiga serial driver: port_write_mutex fixup

The port_write_mutex was converted from a semaphore to a mutex,
but there was still this ifdef'd init_MUTEX reference remaining.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agostopmachine: semaphore to mutex
Daniel Walker [Wed, 6 Feb 2008 09:37:41 +0000 (01:37 -0800)]
stopmachine: semaphore to mutex

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/reiserfs/xattr.c: use LIST_HEAD instead of LIST_HEAD_INIT
Denis Cheng [Wed, 6 Feb 2008 09:37:40 +0000 (01:37 -0800)]
fs/reiserfs/xattr.c: use LIST_HEAD instead of LIST_HEAD_INIT

Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char/ipmi/ipmi_msghandler.c: use LIST_HEAD instead of LIST_HEAD_INIT
Denis Cheng [Wed, 6 Feb 2008 09:37:39 +0000 (01:37 -0800)]
drivers/char/ipmi/ipmi_msghandler.c: use LIST_HEAD instead of LIST_HEAD_INIT

Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodocs: kernel-locking: Convert semaphore references
Daniel Walker [Wed, 6 Feb 2008 09:37:39 +0000 (01:37 -0800)]
docs: kernel-locking: Convert semaphore references

I converted some of the document to reflect mutex usage instead of
semaphore usage.  Since we shouldin't be promoting semaphore usage when
it's on it's way out..

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: enable the echoing of ^C in the N_TTY discipline
Joe Peterson [Wed, 6 Feb 2008 09:37:38 +0000 (01:37 -0800)]
tty: enable the echoing of ^C in the N_TTY discipline

Turn on INTR/QUIT/SUSP echoing in the N_TTY line discipline (e.g.  ctrl-C
will appear as "^C" if stty echoctl is set and ctrl-C is set as INTR).

Linux seems to be the only unix-like OS (recently I've verified this on
Solaris, BSD, and Mac OS X) that does *not* behave this way, and I really
miss this as a good visual confirmation of the interrupt of a program in
the console or xterm.  I remember this fondly from many Unixs I've used
over the years as well.  Bringing this to Linux also seems like a good way
to make it yet more compliant with standard unix-like behavior.

[akpm@linux-foundation.org: coding-style fixes]
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd arch_ptrace_stop
Roland McGrath [Wed, 6 Feb 2008 09:37:37 +0000 (01:37 -0800)]
Add arch_ptrace_stop

This adds support to allow asm/ptrace.h to define two new macros,
arch_ptrace_stop_needed and arch_ptrace_stop.  These control special
machine-specific actions to be done before a ptrace stop.  The new code
compiles away to nothing when the new macros are not defined.  This is the
case on all machines to begin with.

On ia64, these macros will be defined to solve the long-standing issue of
ptrace vs register backing store.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Petr Tesarik <ptesarik@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Matthew Wilcox <willy@debian.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoquota: improve inode list scanning in add_dquot_ref()
Jan Kara [Wed, 6 Feb 2008 09:37:36 +0000 (01:37 -0800)]
quota: improve inode list scanning in add_dquot_ref()

We restarted scan of sb->s_inodes list whenever we had to drop inode_lock
in add_dquot_ref().  This leads to overall quadratic running time and thus
add_dquot_ref() can take several minutes when called on a life filesystem.
We fix the problem by using the fact that inode cannot be removed from
s_inodes list while we hold a reference to it and thus we can safely
restart the scan if we don't drop the reference.  Here we use the fact that
inodes freshly added to s_inodes list are already guaranteed to have quotas
properly initialized and the ordering of inodes on s_inodes list does not
change so we cannot skip any inode.

Thanks goes to Nick <gentuu@gmail.com> for analyzing the problem and
testing the fix.

[akpm@linux-foundation.org: iput(NULL) is legal]
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Nick <gentuu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char: use LIST_HEAD instead of LIST_HEAD_INIT
Denis Cheng [Wed, 6 Feb 2008 09:37:35 +0000 (01:37 -0800)]
drivers/char: use LIST_HEAD instead of LIST_HEAD_INIT

single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouio: nopage
Nick Piggin [Wed, 6 Feb 2008 09:37:35 +0000 (01:37 -0800)]
uio: nopage

Convert uio from nopage to fault.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Hans J Koch <hjk@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorelay: nopage
Nick Piggin [Wed, 6 Feb 2008 09:37:34 +0000 (01:37 -0800)]
relay: nopage

Convert relay from nopage to fault.
Remove redundant vma range checks.
Switch from OOM to SIGBUS if the resource is not available.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Tom Zanussi <zanussi@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokallsyms should prefer non weak symbols
Paulo Marques [Wed, 6 Feb 2008 09:37:33 +0000 (01:37 -0800)]
kallsyms should prefer non weak symbols

When resolving symbol names from addresses with aliased symbol names,
kallsyms_lookup always returns the first symbol, even if it is a weak
symbol.

This patch changes this by sorting the symbols with the weak symbols last
before feeding them to the kernel.  This way the kernel runtime isn't
changed at all, only the kallsyms build system is changed.

Another side effect is that the symbols get sorted by address, too.  So,
even if future binutils version have some bug in "nm" that makes it fail to
correctly sort symbols by address, the kernel won't be affected by this.

Mathieu says:

  I created a module in LTTng that uses kallsyms to get the symbol
  corresponding to a specific system call address.  Unfortunately, all the
  unimplemented syscalls were all referring to the (same) weak symbol
  identifying an unrelated system call rather that sys_ni (or whatever
  non-weak symbol would be expected).  Kallsyms was dumbly returning the first
  symbol that matched.

  This patch makes sure kallsyms returns the non-weak symbol when there is
  one, which seems to be the expected result.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Looks-great-to: Rusty Russell <rusty@rustcorp.com.au>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agounix98 allocated_ptys_lock semaphore to mutex
Daniel Walker [Wed, 6 Feb 2008 09:37:32 +0000 (01:37 -0800)]
unix98 allocated_ptys_lock semaphore to mutex

Convert the unix98 allocated_ptys_lock to a mutex.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/isdn/i4l/isdn_tty.c: remove write_sem
Daniel Walker [Wed, 6 Feb 2008 09:37:32 +0000 (01:37 -0800)]
drivers/isdn/i4l/isdn_tty.c: remove write_sem

I couldn't find any users, so removing it..

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char/tty_io.c: remove pty_sem
Daniel Walker [Wed, 6 Feb 2008 09:37:31 +0000 (01:37 -0800)]
drivers/char/tty_io.c: remove pty_sem

I couldn't find any users, so removing it..

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Alan Cox <alan@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocumentation about unaligned memory access
Daniel Drake [Wed, 6 Feb 2008 09:37:30 +0000 (01:37 -0800)]
Documentation about unaligned memory access

Here's a document I wrote after figuring out what unaligned memory access
is all about.  I've tried to cover the information I was looking for when
trying to learn about this, without producing a hopelessly detailed/complex
spew.  I hope it is useful to others.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Cc: Rob Landley <rob@landley.net>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Kyle Moffett <mrmacman_g4@mac.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoinotify: remove debug code
Nick Piggin [Wed, 6 Feb 2008 09:37:29 +0000 (01:37 -0800)]
inotify: remove debug code

The inotify debugging code is supposed to verify that the
DCACHE_INOTIFY_PARENT_WATCHED scalability optimisation does not result in
notifications getting lost nor extra needless locking generated.

Unfortunately there are also some races in the debugging code.  And it isn't
very good at finding problems anyway.  So remove it for now.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Robert Love <rlove@google.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Cc: Jan Kara <jack@ucw.cz>
Cc: Yan Zheng <yanzheng@21cn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoinotify: fix race
Nick Piggin [Wed, 6 Feb 2008 09:37:28 +0000 (01:37 -0800)]
inotify: fix race

There is a race between setting an inode's children's "parent watched" flag
when placing the first watch on a parent, and instantiating new children of
that parent: a child could miss having its flags set by
set_dentry_child_flags, but then inotify_d_instantiate might still see
!inotify_inode_watched.

The solution is to set_dentry_child_flags after adding the watch.  Locking is
taken care of, because both set_dentry_child_flags and inotify_d_instantiate
hold dcache_lock and child->d_locks.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Robert Love <rlove@google.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Cc: Jan Kara <jack@ucw.cz>
Cc: Yan Zheng <yanzheng@21cn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoSC26XX: New serial driver for SC2681 uarts
Thomas Bogendoerfer [Wed, 6 Feb 2008 09:37:27 +0000 (01:37 -0800)]
SC26XX: New serial driver for SC2681 uarts

New serial driver for SC2681/SC2691 uarts.  Older SNI RM400 machines are
using these chips for onboard serial ports.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Torben Mathiasen <device@lanana.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agochar: use SGI_HAS_DS1286 for SGI_DS1286 depends
Thomas Bogendoerfer [Wed, 6 Feb 2008 09:37:26 +0000 (01:37 -0800)]
char: use SGI_HAS_DS1286 for SGI_DS1286 depends

Use SGI_HAS_DS1286 for SGI_DS1286 depends

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: use SGI_HAS_ZILOG for IP22_ZILOG depends
Thomas Bogendoerfer [Wed, 6 Feb 2008 09:37:26 +0000 (01:37 -0800)]
serial: use SGI_HAS_ZILOG for IP22_ZILOG depends

- Use SGI_HAS_ZILOG for IP22_ZILOG depends
- remove IP22 from description, because the driver works on more than
  IP22 SGI machines

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRemove superfluous checks for CONFIG_BLK_DEV_INITRD from initramfs.c
Robert P. J. Day [Wed, 6 Feb 2008 09:37:25 +0000 (01:37 -0800)]
Remove superfluous checks for CONFIG_BLK_DEV_INITRD from initramfs.c

Given that init/Makefile includes initramfs.c in the build only if
CONFIG_BLK_DEV_INITRD is defined, there seems to be no point checking for
it yet again.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRemove rcu_assign_pointer() penalty for NULL pointers
Paul E. McKenney [Wed, 6 Feb 2008 09:37:25 +0000 (01:37 -0800)]
Remove rcu_assign_pointer() penalty for NULL pointers

The rcu_assign_pointer() primitive currently unconditionally executes a
memory barrier, even when a NULL pointer is being assigned.  This has lead
some to avoid using rcu_assign_pointer() for NULL pointers, which loses the
self-documenting advantages of rcu_assign_pointer() This patch uses
__builtin_const_p() to omit needless memory barriers for NULL-pointer
assignments at compile time with no runtime penalty, as discussed in the
following thread:

http://www.mail-archive.com/netdev@vger.kernel.org/msg54852.html

Tested on x86_64 and ppc64, also compiled the four cases (NULL/non-NULL
and const/non-const) with gcc version 4.1.2, and hand-checked the
assembly output.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokill an unused PTR_ERR in bdev_cache_init()
Qi Yong [Wed, 6 Feb 2008 09:37:23 +0000 (01:37 -0800)]
kill an unused PTR_ERR in bdev_cache_init()

Signed-off-by: Qi Yong <qiyong@fc-cn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char/random.c:write_pool() cond_resched() needed
Matt Mackall [Wed, 6 Feb 2008 09:37:20 +0000 (01:37 -0800)]
drivers/char/random.c:write_pool() cond_resched() needed

Reduce latency for large writes to /dev/[u]random

Signed-off-by: Matt Mackall <mpm@selenic.com>
Cc: Sami Farin <safari-kernel@safari.iki.fi>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix __const_udelay declaration and definition mismatches
Jeff Dike [Wed, 6 Feb 2008 09:37:19 +0000 (01:37 -0800)]
Fix __const_udelay declaration and definition mismatches

The declaration and implementation of __const_udelay use different
names for the parameter on a number of architectures:

include/asm-avr32/delay.h:15:extern void __const_udelay(unsigned long usecs);
arch/avr32/lib/delay.c:39:inline void __const_udelay(unsigned long xloops)

include/asm-sh/delay.h:15:extern void __const_udelay(unsigned long usecs);
arch/sh/lib/delay.c:22:inline void __const_udelay(unsigned long xloops)

include/asm-m32r/delay.h:15:extern void __const_udelay(unsigned long usecs);
arch/m32r/lib/delay.c:58:void __const_udelay(unsigned long xloops)

include/asm-x86/delay.h:16:extern void __const_udelay(unsigned long usecs);
arch/x86/lib/delay_32.c:82:inline void __const_udelay(unsigned long xloops)
arch/x86/lib/delay_64.c:46:inline void __const_udelay(unsigned long xloops)

The units of the parameter isn't usecs, so that name is definitely
wrong.  It's also not exactly loops, so I suppose xloops is an OK
name.

This patch changes these names from usecs to xloops.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink_gt fix missed serial input signal changes
Paul Fulghum [Wed, 6 Feb 2008 09:37:18 +0000 (01:37 -0800)]
synclink_gt fix missed serial input signal changes

Fix missed serial input signal changes caused by rereading the serial
status register during interrupt processing.  Now processing is performed
on original status register value.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosynclink: standardize format of linux header file include's with "<>"
Robert P. J. Day [Wed, 6 Feb 2008 09:37:17 +0000 (01:37 -0800)]
synclink: standardize format of linux header file include's with "<>"

Use the recommended form of "<>" to include linux header files, and
move those includes up to join the rest of the linux includes.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoget rid of NR_OPEN and introduce a sysctl_nr_open
Eric Dumazet [Wed, 6 Feb 2008 09:37:16 +0000 (01:37 -0800)]
get rid of NR_OPEN and introduce a sysctl_nr_open

NR_OPEN (historically set to 1024*1024) actually forbids processes to open
more than 1024*1024 handles.

Unfortunatly some production servers hit the not so 'ridiculously high
value' of 1024*1024 file descriptors per process.

Changing NR_OPEN is not considered safe because of vmalloc space potential
exhaust.

This patch introduces a new sysctl (/proc/sys/fs/nr_open) wich defaults to
1024*1024, so that admins can decide to change this limit if their workload
needs it.

[akpm@linux-foundation.org: export it for sparc64]
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoreiserfs: complement va_start() with va_end().
Richard Knutsson [Wed, 6 Feb 2008 09:37:15 +0000 (01:37 -0800)]
reiserfs: complement va_start() with va_end().

Complement va_start() with va_end().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovia-rng: enable secondary noise source on CPUs where it is present
Dave Jones [Wed, 6 Feb 2008 09:37:13 +0000 (01:37 -0800)]
via-rng: enable secondary noise source on CPUs where it is present

In the padlock spec:

"SRC Bits[9:8] Noise source select (I): These bits control the two noise
 sources on the processor that input bits to the accumulation buffers.
 On Nehemiah processors prior to stepping 8, these bits are reserved
 and undefined. The default RESET state is both bits = 0."

Signed-off-by: Dave Jones <davej@redhat.com>
Tested-by: Udo van den Heuvel <udovdh@xs4all.nl>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoinotify: send IN_ATTRIB events when link count changes
Jan Kara [Wed, 6 Feb 2008 09:37:13 +0000 (01:37 -0800)]
inotify: send IN_ATTRIB events when link count changes

Currently, no notification event has been sent when inode's link count
changed.  This is inconvenient for the application in some cases:

Suppose you have the following directory structure

    foo/test
    bar/

and you watch test.  If someone does "mv foo/test bar/", you get event
IN_MOVE_SELF and you know something has happened with the file "test".
However if someone does "ln foo/test bar/test" and "rm foo/test" you get no
inotify event for the file "test" (only directories "foo" and "bar" receive
events).

Furthermore it could be argued that link count belongs to file's metadata and
thus IN_ATTRIB should be sent when it changes.

The following patch implements sending of IN_ATTRIB inotify events when link
count of the inode changes, i.e., when a hardlink to the inode is created or
when it is removed.  This event is sent in addition to all the events sent so
far.  In particular, when a last link to a file is removed, IN_ATTRIB event is
sent in addition to IN_DELETE_SELF event.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Morten Welinder <mwelinder@gmail.com>
Cc: Robert Love <rlove@google.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Cc: Steven French <sfrench@us.ibm.com>
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMAINTAINERS, order AUERSWALD alphabetically
Jiri Slaby [Wed, 6 Feb 2008 09:37:11 +0000 (01:37 -0800)]
MAINTAINERS, order AUERSWALD alphabetically

MAINTAINERS, order AUERSWALD alphabetically

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Wolfgang Muees <wolfgang@iksw-muees.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohfs: update comment to reflect actual init and exit routines
Robert P. J. Day [Wed, 6 Feb 2008 09:37:10 +0000 (01:37 -0800)]
hfs: update comment to reflect actual init and exit routines

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoaddress hfs on-disk corruption robustness review comments
Eric Sandeen [Wed, 6 Feb 2008 09:37:10 +0000 (01:37 -0800)]
address hfs on-disk corruption robustness review comments

Address Roman's review comments for the previously sent on-disk
corruption hfs robustness patch.

- use 0 as a failure value, rather than making a new macro HFS_BAD_KEYLEN,
  and use a switch statement instead of if's.

- Add new fail: target to __hfs_brec_find to skip assignments using bad
  values when exiting with a failure.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoNCPFS: update diagnostic strings to match routine names.
Robert P. J. Day [Wed, 6 Feb 2008 09:37:09 +0000 (01:37 -0800)]
NCPFS: update diagnostic strings to match routine names.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs: use list_for_each_entry_reverse and kill sb_entry
Akinobu Mita [Wed, 6 Feb 2008 09:37:08 +0000 (01:37 -0800)]
fs: use list_for_each_entry_reverse and kill sb_entry

Use list_for_each_entry_reverse for super_blocks list and remove
unused sb_entry macro.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs: use hlist_unhashed
Akinobu Mita [Wed, 6 Feb 2008 09:37:07 +0000 (01:37 -0800)]
fs: use hlist_unhashed

Use hlist_unhashed() instead of opencoded equivalent.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproc: loadavg reading race
Michal Schmidt [Wed, 6 Feb 2008 09:37:07 +0000 (01:37 -0800)]
proc: loadavg reading race

The avenrun[] values are supposed to be protected by xtime_lock.
loadavg_read_proc does not use it.  Theoretically this may result in an
occasional glitch when the value read from /proc/loadavg would be as much
as 1<<11 times higher than it should be.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodo_wait: remove one "else if" branch
Oleg Nesterov [Wed, 6 Feb 2008 09:37:06 +0000 (01:37 -0800)]
do_wait: remove one "else if" branch

Minor cleanup. We can remove one "else if" branch.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAvoid divide in IS_ALIGN
Herbert Xu [Wed, 6 Feb 2008 09:37:05 +0000 (01:37 -0800)]
Avoid divide in IS_ALIGN

I was happy to discover the brand new IS_ALIGN macro and quickly used it in
my code.  To my dismay I found that the generated code used division to
perform the test.

This patch fixes it by changing the % test to an &.  This avoids the
division.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovt: bitlock fix
Nick Piggin [Wed, 6 Feb 2008 09:37:04 +0000 (01:37 -0800)]
vt: bitlock fix

vt is missing a memory barrier to close the critical section.  Use a real
spinlock for this.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotpm.c: fix crash during device removal
Richard MUSIL [Wed, 6 Feb 2008 09:37:02 +0000 (01:37 -0800)]
tpm.c: fix crash during device removal

The clean up procedure now uses platform device "release" callback to
handle memory clean up.  For this purpose "release" function callback was
added to struct tpm_vendor_specific, so hw device driver provider can get
called when it is safe to remove all allocated resources.

This is supposed to fix a bug in device removal, where device while in
receive function (waiting on timeout) was prone to segfault, if the
tpm_chip struct was unallocated before the timeout expired (in
tpm_remove_hardware).

Acked-by: Marcel Selhorst <tpm@selhorst.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoprintk.c: use unsigned ints instead of longs for logbuf index
Denys Vlasenko [Wed, 6 Feb 2008 09:37:02 +0000 (01:37 -0800)]
printk.c: use unsigned ints instead of longs for logbuf index

Stop using unsigned _longs_ for printk buffer indexes.  Log buffer is way
smaller than 2 gigabytes and unsigned ints will work too .  Indeed, they do
work nicely on all 32-bit platforms where longs and ints are the same.

With this patch, we have following size savings on amd64:

   text    data     bss     dec     hex filename
   5997     313   17736   24046    5dee 2.6.23.1.t64/kernel/printk.o
   5858     313   17700   23871    5d3f 2.6.23.1.printk.t64/kernel/printk.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPERCPU : __percpu_alloc_mask() can dynamically size percpu_data storage
Eric Dumazet [Wed, 6 Feb 2008 09:37:01 +0000 (01:37 -0800)]
PERCPU : __percpu_alloc_mask() can dynamically size percpu_data storage

Instead of allocating a fix sized array of NR_CPUS pointers for percpu_data,
we can use nr_cpu_ids, which is generally < NR_CPUS.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoDocument I_SYNC and I_DATASYNC
Joern Engel [Wed, 6 Feb 2008 09:36:59 +0000 (01:36 -0800)]
Document I_SYNC and I_DATASYNC

After some archeology (see http://logfs.org/logfs/inode_state_bits) I
finally figured out what the three I_DIRTY bits do.  Maybe others would
prefer less effort to reach this insight.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoalpha/parisc: remove config variable DEBUG_RWLOCK
Jiri Olsa [Wed, 6 Feb 2008 09:36:56 +0000 (01:36 -0800)]
alpha/parisc: remove config variable DEBUG_RWLOCK

Remove config variable DEBUG_RWLOCK, since it is not used.

Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs: remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbol
Jiri Olsa [Wed, 6 Feb 2008 09:36:55 +0000 (01:36 -0800)]
fs: remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbol

Remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbol.

Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolog2.h: Define order_base_2() macro for convenience.
Robert P. J. Day [Wed, 6 Feb 2008 09:36:54 +0000 (01:36 -0800)]
log2.h: Define order_base_2() macro for convenience.

Given a number of places in the tree that need to calculate this value
explicitly, might as well just create a macro for it.

(akpm: must be implemented as a macro for callee typeof() usage)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocciss: use upper_32_bits() macro to eliminate warnings
Randy Dunlap [Wed, 6 Feb 2008 09:36:54 +0000 (01:36 -0800)]
cciss: use upper_32_bits() macro to eliminate warnings

Use upper_32_bits(x) macro to handle shifts that may be >= the width of
the data type.

drivers/block/cciss.c: In function 'do_cciss_request':
drivers/block/cciss.c:2655: warning: right shift count >= width of type
drivers/block/cciss.c:2656: warning: right shift count >= width of type
drivers/block/cciss.c:2657: warning: right shift count >= width of type
drivers/block/cciss.c:2658: warning: right shift count >= width of type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotime: fix sysfs_show_{available,current}_clocksources() buffer overflow problem
Miao Xie [Wed, 6 Feb 2008 09:36:53 +0000 (01:36 -0800)]
time: fix sysfs_show_{available,current}_clocksources() buffer overflow problem

I found that there is a buffer overflow problem in the following code.

Version: 2.6.24-rc2,
File: kernel/time/clocksource.c:417-432
--------------------------------------------------------------------
static ssize_t
sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
{
struct clocksource *src;
char *curr = buf;

spin_lock_irq(&clocksource_lock);
list_for_each_entry(src, &clocksource_list, list) {
curr += sprintf(curr, "%s ", src->name);
}
spin_unlock_irq(&clocksource_lock);

curr += sprintf(curr, "\n");

return curr - buf;
}
-----------------------------------------------------------------------

sysfs_show_current_clocksources() also has the same problem though in practice
the size of current clocksource's name won't exceed PAGE_SIZE.

I fix the bug by using snprintf according to the specification of the kernel
(Version:2.6.24-rc2,File:Documentation/filesystems/sysfs.txt)

Fix sysfs_show_available_clocksources() and sysfs_show_current_clocksources()
buffer overflow problem with snprintf().

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosound/oss/trident.c: fix incorrect test in trident_ac97_set()
Roel Kluin [Wed, 6 Feb 2008 09:36:51 +0000 (01:36 -0800)]
sound/oss/trident.c: fix incorrect test in trident_ac97_set()

If count reaches zero, the loop ends, but the postfix decrement still
subtracts: testing for 'count == 0' will not work.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Reviewed-by: Ray Lee <ray-lk@madrabbit.org>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agord: use is_power_of_2() in drivers/block/rd.c.
Robert P. J. Day [Wed, 6 Feb 2008 09:36:51 +0000 (01:36 -0800)]
rd: use is_power_of_2() in drivers/block/rd.c.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/misc/lkdtm.c: cleanups
Adrian Bunk [Wed, 6 Feb 2008 09:36:50 +0000 (01:36 -0800)]
drivers/misc/lkdtm.c: cleanups

- make needlessly global functions static
- make lkdtm_module_{init,exit}() as __{init,exit}

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ankita Garg <ankita@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproper prototype for vty_init()
Adrian Bunk [Wed, 6 Feb 2008 09:36:49 +0000 (01:36 -0800)]
proper prototype for vty_init()

Add a proper prototype for vty_init() in include/linux/vt_kern.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/eventfd.c should #include <linux/syscalls.h>
Adrian Bunk [Wed, 6 Feb 2008 09:36:49 +0000 (01:36 -0800)]
fs/eventfd.c should #include <linux/syscalls.h>

Every file should include the headers containing the prototypes for its global
functions (in this case sys_eventfd()).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/signalfd.c should #include <linux/syscalls.h>
Adrian Bunk [Wed, 6 Feb 2008 09:36:48 +0000 (01:36 -0800)]
fs/signalfd.c should #include <linux/syscalls.h>

Every file should include the headers containing the prototypes for its global
functions (in this case sys_signalfd()).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/utimes.c should #include <linux/syscalls.h>
Adrian Bunk [Wed, 6 Feb 2008 09:36:47 +0000 (01:36 -0800)]
fs/utimes.c should #include <linux/syscalls.h>

Every file should include the headers containing the prototypes for its global
functions.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproper prototype for get_filesystem_list()
Adrian Bunk [Wed, 6 Feb 2008 09:36:47 +0000 (01:36 -0800)]
proper prototype for get_filesystem_list()

Ad a proper prototype for migration_init() in include/linux/fs.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/notifier.c should #include <linux/reboot.h>
Adrian Bunk [Wed, 6 Feb 2008 09:36:46 +0000 (01:36 -0800)]
kernel/notifier.c should #include <linux/reboot.h>

Every file should include the headers containing the prototypes for its global
functions (in this case {,un}register_reboot_notifier()).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake srcu_readers_active() static
Adrian Bunk [Wed, 6 Feb 2008 09:36:45 +0000 (01:36 -0800)]
make srcu_readers_active() static

Make the needlessly global srcu_readers_active() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokernel/ptrace.c should #include <linux/syscalls.h>
Adrian Bunk [Wed, 6 Feb 2008 09:36:44 +0000 (01:36 -0800)]
kernel/ptrace.c should #include <linux/syscalls.h>

Every file should include the headers containing the prototypes for its global
functions (in this case sys_ptrace()).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproper prototype for signals_init()
Adrian Bunk [Wed, 6 Feb 2008 09:36:44 +0000 (01:36 -0800)]
proper prototype for signals_init()

Add a proper prototype for signals_init() in include/linux/signal.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmbfs: fix calculation of kernel_recvmsg size parameter in smb_receive()
Jeff Layton [Wed, 6 Feb 2008 09:36:43 +0000 (01:36 -0800)]
smbfs: fix calculation of kernel_recvmsg size parameter in smb_receive()

smb_receive calls kernel_recvmsg with a size that's the minimum of the
amount of buffer space in the kvec passed in or req->rq_rlen (which
represents the length of the response).  This does not take into account
any data that was read in a request earlier pass through smb_receive.

If the first pass through smb_receive receives some but not all of the
response, then the next pass can call kernel_recvmsg with a size field
that's too big.  kernel_recvmsg can overrun into the next response,
throwing off the alignment and making it unrecognizable.

This causes messages like this to pop up in the ring buffer:

smb_get_length: Invalid NBT packet, code=69

as well as other errors indicating that the response is unrecognizable.
Typically this is seen on a smbfs mount under heavy I/O.

This patch changes the code to use (req->rq_rlen - req->rq_bytes_recvd)
instead instead of just req->rq_rlen, since that should represent the
amount of unread data in the response.

I think this is correct, but an ACK or NACK from someone more familiar
with this code would be appreciated...

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoread_current_timer() cleanups
Andrew Morton [Wed, 6 Feb 2008 09:36:42 +0000 (01:36 -0800)]
read_current_timer() cleanups

- All implementations can be __devinit

- The function prototypes were in asm/timex.h but they all must be the same,
  so create a single declaration in linux/timex.h.

- uninline the sparc64 version to match the other architectures

- Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.

[ezk@cs.sunysb.edu: fix build]
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoscheduled OSS driver removal
Adrian Bunk [Wed, 6 Feb 2008 09:36:36 +0000 (01:36 -0800)]
scheduled OSS driver removal

This patch contains the scheduled removal of OSS drivers whose config
options have been removed in 2.6.23.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFAT: Fix printk format strings
Vegard Nossum [Wed, 6 Feb 2008 09:36:36 +0000 (01:36 -0800)]
FAT: Fix printk format strings

This makes sure printk format strings contain no more than a single line.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
[the message was tweaked.]
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproper show_interrupts() prototype
Adrian Bunk [Wed, 6 Feb 2008 09:36:35 +0000 (01:36 -0800)]
proper show_interrupts() prototype

Add a proper prototype for show_interrupts() in include/linux/interrupt.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMNT_UNBINDABLE fix
Andries E. Brouwer [Wed, 6 Feb 2008 09:36:32 +0000 (01:36 -0800)]
MNT_UNBINDABLE fix

Some time ago ( http://lkml.org/lkml/2007/6/19/128 ) I wrote about
MNT_UNBINDABLE that it felt like a bug that it is not reset by "mount
--make-private".

Today I happened to see mount(8) and Documentation/sharedsubtree.txt and
both document the version obtained by applying the little patch given in
the above (and again below).

So, the present kernel code is not according to specs and must be regarded
as buggy.

Specification in Documentation/sharedsubtree.txt:
See state diagram: unbindable should become private upon make-private.

Specification in mount(8):
    ...  It's
    also possible to  set  up  uni-directional  propagation  (with  --make-
    slave),  to  make  a  mount  point unavailable for --bind/--rbind (with
    --make-unbindable), and to undo any  of  these  (with  --make-private).

Repeat of old fix-shared-subtrees-make-private.patch
(due to Dirk Gerrits, René Gabriëls, Peter Kooijmans):

Acked-by: Ram Pai <linuxram@us.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoremove mm_{ptov,vtop}()
Adrian Bunk [Wed, 6 Feb 2008 09:36:30 +0000 (01:36 -0800)]
remove mm_{ptov,vtop}()

This patch removes the unused mm_{ptov,vtop}().

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Cc: Miles Bader <miles.bader@necel.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocleanup after APUS removal
Adrian Bunk [Wed, 6 Feb 2008 09:36:29 +0000 (01:36 -0800)]
cleanup after APUS removal

After the APUS removal, some code can be removed.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake ipc/util.c:sysvipc_find_ipc() static
Adrian Bunk [Wed, 6 Feb 2008 09:36:28 +0000 (01:36 -0800)]
make ipc/util.c:sysvipc_find_ipc() static

sysvipc_find_ipc() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Nadia Derbey <Nadia.Derbey@bull.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoregister_cpu __devinit or __cpuinit
Randy Dunlap [Wed, 6 Feb 2008 09:36:28 +0000 (01:36 -0800)]
register_cpu __devinit or __cpuinit

Is there some reason why register_cpu() is __devinit instead of __cpuinit ?
Make it __cpuinit.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>