pandora-kernel.git
13 years agoWATCHDOG: octeon-wdt: Use I/O clock rate for timing calculations.
David Daney [Thu, 7 Oct 2010 23:03:52 +0000 (16:03 -0700)]
WATCHDOG: octeon-wdt: Use I/O clock rate for timing calculations.

The creation of the I/O clock domain requires some adjustments.  Since
the watchdog counters are clocked by the I/O clock, use its rate for
timing calculations.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org
Patchwork: http://patchwork.linux-mips.org/patch/1659/
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoATA: pata_octeon_cf: Use I/O clock rate for timing calculations.
David Daney [Thu, 7 Oct 2010 23:03:51 +0000 (16:03 -0700)]
ATA: pata_octeon_cf: Use I/O clock rate for timing calculations.

The creation of the I/O clock domain requires some adjustments.  Since the
CF bus timing logic is clocked by the I/O clock, use its rate for delay
calculations.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org
Patchwork: http://patchwork.linux-mips.org/patch/1660/
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Use I/O clock rate for calculations.
David Daney [Thu, 7 Oct 2010 23:03:50 +0000 (16:03 -0700)]
MIPS: Octeon: Use I/O clock rate for calculations.

The I2C and UARTS are clocked by the I/O clock, use its rate for these
devices.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1670/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Add octeon_get_io_clock_rate() for cn63xx
David Daney [Thu, 7 Oct 2010 23:03:49 +0000 (16:03 -0700)]
MIPS: Octeon: Add octeon_get_io_clock_rate() for cn63xx

Starting with cn63xx Octeon I/O blocks are clocked at a different rate
than the CPU.  Add a new function octeon_get_io_clock_rate() that
yields the I/O clock rate.

Also rearrange octeon_get_clock_rate() to get the value from the saved
sysinfo structure.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1671/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Remove bogus code from octeon_get_clock_rate()
David Daney [Thu, 7 Oct 2010 23:03:48 +0000 (16:03 -0700)]
MIPS: Octeon: Remove bogus code from octeon_get_clock_rate()

We can run with any simulator clock rate.  Get rid of the code
overriding it to 6MHz.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1669/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Scale Octeon2 clocks in octeon_init_cvmcount()
David Daney [Thu, 7 Oct 2010 23:03:47 +0000 (16:03 -0700)]
MIPS: Octeon: Scale Octeon2 clocks in  octeon_init_cvmcount()

The per-CPU clocks are synchronized from IPD_CLK_COUNT, on cn63XX it must
be scaled by the clock frequency ratio.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1667/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Enable Read Inhibit / eXecute Inhibit on Octeon II.
David Daney [Thu, 7 Oct 2010 23:03:46 +0000 (16:03 -0700)]
MIPS: Octeon: Enable Read Inhibit / eXecute Inhibit on Octeon II.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1666/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Probe for Octeon II CPUs.
David Daney [Thu, 7 Oct 2010 23:03:45 +0000 (16:03 -0700)]
MIPS: Octeon: Probe for Octeon II CPUs.

The OCTEON II ISA extends the original OCTEON ISA, so give it its own
__elf_platform string so optimized libraries can be selected in
userspace.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1665/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Handle Octeon II caches.
David Daney [Thu, 7 Oct 2010 23:03:44 +0000 (16:03 -0700)]
MIPS: Octeon: Handle Octeon II caches.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1664/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Add identifiers for Octeon II CPUs.
David Daney [Thu, 7 Oct 2010 23:03:43 +0000 (16:03 -0700)]
MIPS: Add identifiers for Octeon II CPUs.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1662/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Update L2 Cache code for CN63XX
David Daney [Thu, 7 Oct 2010 23:03:42 +0000 (16:03 -0700)]
MIPS: Octeon: Update L2 Cache code for CN63XX

The CN63XX has a different L2 cache architecture.  Update the helper
functions to reflect this.

Some joining of split lines was also done to improve readability, as
well as reformatting of comments.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1663/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Add cn63XX to Octeon chip detection macros.
David Daney [Thu, 7 Oct 2010 23:03:41 +0000 (16:03 -0700)]
MIPS: Octeon: Add cn63XX to Octeon chip detection macros.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1661/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Update register definitions for CN63XX chips
David Daney [Thu, 7 Oct 2010 23:03:40 +0000 (16:03 -0700)]
MIPS: Octeon: Update register definitions for CN63XX chips

The CN63XX is a new 6-CPU SOC based on the new OCTEON II CPU cores.

Join some lines back together.  This makes some of them exceed 80
columns, but they are uninteresting and this unclutters things.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1668/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Rewrite DMA mapping functions.
David Daney [Fri, 1 Oct 2010 20:27:34 +0000 (13:27 -0700)]
MIPS: Octeon: Rewrite DMA mapping functions.

All Octeon chips can support more than 4GB of RAM.  Also due to how Octeon
PCI is setup, even some configurations with less than 4GB of RAM will have
portions that are not accessible from 32-bit devices.

Enable the swiotlb code to handle the cases where a device cannot directly
do DMA.  This is a complete rewrite of the Octeon DMA mapping code.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1639/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Add a platform hook for swiotlb setup.
David Daney [Fri, 1 Oct 2010 20:27:33 +0000 (13:27 -0700)]
MIPS: Add a platform hook for swiotlb setup.

This allows platforms that are using the swiotlb to initialize it.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1638/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Convert DMA to use dma-mapping-common.h
David Daney [Fri, 1 Oct 2010 20:27:32 +0000 (13:27 -0700)]
MIPS: Convert DMA to use dma-mapping-common.h

Use asm-generic/dma-mapping-common.h to handle all DMA mapping operations
and establish a default get_dma_ops() that forwards all operations to the
existing code.

Augment dev_archdata to carry a pointer to the struct dma_map_ops, allowing
DMA operations to be overridden on a per device basis.  Currently this is
never filled in, so the default dma_map_ops are used.  A follow-on patch
sets this for Octeon PCI devices.

Also initialize the dma_debug system as it is now used if it is configured.

Includes fixes by Kevin Cernekee <cernekee@gmail.com>.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1637/
Patchwork: http://patchwork.linux-mips.org/patch/1678/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ip32, ip27, jazz: Make static functions in dma-coherence.h inline.
David Daney [Fri, 1 Oct 2010 20:27:31 +0000 (13:27 -0700)]
MIPS: ip32, ip27, jazz: Make static functions in dma-coherence.h inline.

Any function defined in a header file should be inline.  This helps us
avoid 'unused' compiler warnings when we include the files in more
places in subsequent patches.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1636/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Select ZONE_DMA32
David Daney [Fri, 1 Oct 2010 20:27:30 +0000 (13:27 -0700)]
MIPS: Octeon: Select ZONE_DMA32

Give us a nice place to allocate coherent DMA memory for 32-bit devices.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1635/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Adjust top of DMA32 zone.
David Daney [Fri, 1 Oct 2010 20:27:29 +0000 (13:27 -0700)]
MIPS: Octeon: Adjust top of DMA32 zone.

On OCTEON, we reserve the last 256MB of 32-bit PCI address space, mapping
the RAM in this region at a high DMA address.  This makes memory in this
region unavailable for 32-bit DMA.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1634/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Allow MAX_DMA32_PFN to be overridden.
David Daney [Fri, 1 Oct 2010 20:27:28 +0000 (13:27 -0700)]
MIPS: Allow MAX_DMA32_PFN to be overridden.

DMA mapping may reduce the usable physical address range usable for
32-bit DMA.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1633/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Octeon: Set dma_masks for octeon_mgmt device.
David Daney [Fri, 1 Oct 2010 20:27:27 +0000 (13:27 -0700)]
MIPS: Octeon: Set dma_masks for octeon_mgmt device.

This allows follow-on patches to dma mapping functions to work with
the octeon mgmt device..

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1632/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: IRQ: Add stackoverflow detection
From: jiang.adam@gmail.com [Fri, 27 Aug 2010 09:32:06 +0000 (18:32 +0900)]
MIPS: IRQ: Add stackoverflow detection

Add stackoverflow detection to mips arch

Signed-off-by: Adam Jiang <jiang.adam@gmail.com>
Cc: dmitri.vorobiev@movial.com
Cc: wuzhangjin@gmail.com
Cc: ddaney@caviumnetworks.com
Cc: peterz@infradead.org
Cc: fweisbec@gmail.com
Cc: tj@kernel.org
Cc: tglx@linutronix.de
Cc: mingo@elte.hu
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1559/
Patchwork: https://patchwork.linux-mips.org/patch/1651/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Kconfig cleanup
Thomas Gleixner [Wed, 8 Sep 2010 13:39:14 +0000 (15:39 +0200)]
MIPS: Kconfig cleanup

arch/mips/Kconfig already sets GENERIC_HARDIRQS_NO__DO_IRQ unconditionally.
Remove the redundant select from the Loongson Kconfig.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Remove wait argument of r4k_on_each_cpu
Ralf Baechle [Fri, 29 Oct 2010 18:08:25 +0000 (19:08 +0100)]
MIPS: Remove wait argument of r4k_on_each_cpu

All callers were passing in 1 anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: More detailed description of r4k_on_each_cpu
Ralf Baechle [Fri, 29 Oct 2010 18:08:25 +0000 (19:08 +0100)]
MIPS: More detailed description of r4k_on_each_cpu

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Get rid of branches to .subsections.
Ralf Baechle [Fri, 29 Oct 2010 18:08:24 +0000 (19:08 +0100)]
MIPS: Get rid of branches to .subsections.

It was a nice optimization - on paper at least.  In practice it results in
branches that may exceed the maximum legal range for a branch.  We can
fight that problem with -ffunction-sections but -ffunction-sections again
is incompatible with -pg used by the function tracer.

By rewriting the loop around all simple LL/SC blocks to C we reduce the
amount of inline assembler and at the same time allow GCC to often fill
the branch delay slots with something sensible or whatever else clever
optimization it may have up in its sleeve.

With this optimization gone we also no longer need -ffunction-sections,
so drop it.

This optimization was originally introduced in 2.6.21, commit
5999eca25c1fd4b9b9aca7833b04d10fe4bc877d (linux-mips.org) rsp.
f65e4fa8e0c6022ad58dc88d1b11b12589ed7f9f (kernel.org).

Original fix for the issues which caused me to pull this optimization by
Paul Gortmaker <paul.gortmaker@windriver.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 29 Oct 2010 17:37:27 +0000 (10:37 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: Cleanup and thus reduce smb session structure and fields used during authentication
  NTLM auth and sign - Use appropriate server challenge
  cifs: add kfree() on error path
  NTLM auth and sign - minor error corrections and cleanup
  NTLM auth and sign - Use kernel crypto apis to calculate hashes and smb signatures
  NTLM auth and sign - Define crypto hash functions and create and send keys needed for key exchange
  cifs: cifs_convert_address() returns zero on error
  NTLM auth and sign - Allocate session key/client response dynamically
  cifs: update comments - [s/GlobalSMBSesLock/cifs_file_list_lock/g]
  cifs: eliminate cifsInodeInfo->write_behind_rc (try #6)
  [CIFS] Fix checkpatch warnings and bump cifs version number
  cifs: wait for writeback to complete in cifs_flush
  cifs: convert cifsFileInfo->count to non-atomic counter

13 years agoreadv/writev: do the same MAX_RW_COUNT truncation that read/write does
Linus Torvalds [Fri, 29 Oct 2010 17:36:49 +0000 (10:36 -0700)]
readv/writev: do the same MAX_RW_COUNT truncation that read/write does

We used to protect against overflow, but rather than return an error, do
what read/write does, namely to limit the total size to MAX_RW_COUNT.
This is not only more consistent, but it also means that any broken
low-level read/write routine that still keeps counts in 'int' can't
break.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoparisc-agp: fix missing slab.h include
Kyle McMartin [Fri, 29 Oct 2010 16:48:01 +0000 (12:48 -0400)]
parisc-agp: fix missing slab.h include

Commit 338e4fab added a missing kfree if the alloc_pci_dev failed
but forgot to include <linux/slab.h> for the definition of
kfree.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
13 years agox86, ftrace: Use safe noops, drop trap test
H. Peter Anvin [Thu, 28 Oct 2010 04:09:15 +0000 (21:09 -0700)]
x86, ftrace: Use safe noops, drop trap test

Always use a safe 5-byte noop sequence.  Drop the trap test, since it
is known to return false negatives on some virtualization platforms on
32 bits.  The resulting code is both simpler and safer.

Cc: Daniel Drake <dsd@laptop.org>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
13 years agojump_label: Fix unaligned traps on sparc.
David Miller [Sat, 23 Oct 2010 18:06:24 +0000 (11:06 -0700)]
jump_label: Fix unaligned traps on sparc.

The vmlinux.lds.h knobs to emit the __jump_table section in the main
kernel image takes care to align the section, but this doesn't help
for the __jump_table section that gets emitted into modules.

Fix the resulting lack of section alignment by explicitly specifying
it in the assembler.

Signed-off-by: David S. Miller <davem@davemloft.net>
LKML-Reference: <20101023.110624.226758370.davem@davemloft.net>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
13 years agojump label: Make arch_jump_label_text_poke_early() optional
Steven Rostedt [Fri, 29 Oct 2010 15:02:43 +0000 (11:02 -0400)]
jump label: Make arch_jump_label_text_poke_early() optional

Some archs do not need to do anything special for jump labels on
startup (like MIPS).  This patch adds a weak function stub for
arch_jump_label_text_poke_early();

Cc: Jason Baron <jbaron@redhat.com>
Cc: David Miller <davem@davemloft.net>
Cc: David Daney <ddaney@caviumnetworks.com>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <1286218615-24011-2-git-send-email-ddaney@caviumnetworks.com>
LKML-Reference: <20101015201037.703989993@goodmis.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
13 years agojump label: Fix error with preempt disable holding mutex
Steven Rostedt [Mon, 18 Oct 2010 14:38:58 +0000 (10:38 -0400)]
jump label: Fix error with preempt disable holding mutex

Kprobes and jump label were having a race between mutexes that
was fixed by reordering the jump label. But this reordering
moved the jump label mutex into a preempt disable location.

This patch does a little fiddling to move the grabbing of
the jump label mutex from inside the preempt disable section
and still keep the order correct between the mutex and the
kprobes lock.

Reported-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jason Baron <jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 29 Oct 2010 15:49:18 +0000 (08:49 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] fix kprobes single stepping
  [S390] tape: fix dbf usage
  [S390] dasd: provide a Sense Path Group ID ioctl
  [S390] ftrace: select HAVE_C_RECORDMCOUNT
  [S390] vdso: get rid of redefinition warnings
  [S390] facility detection: remove unused variable
  [S390] hypfs: Fix error handling in hypfs_diag initialization
  [S390] topology: fix cpu masks for topology=off case
  [S390] topology: add SCHED_MC config option
  [S390] Kconfig: add machine type number to code generation options
  [S390] Add z196 machine type to setup_hwcaps

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus
Linus Torvalds [Fri, 29 Oct 2010 15:48:58 +0000 (08:48 -0700)]
Merge git://git./linux/kernel/git/pkl/squashfs-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
  Squashfs: fix function prototype
  Squashfs: fix use of __le64 annotated variable

13 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Fri, 29 Oct 2010 15:47:36 +0000 (08:47 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: tidy up device searches in read_balance.
  md/raid1: fix some typos in comments.
  md/raid1: discard unused variable.
  md: unplug writes to external bitmaps.
  md: use separate bio pool for each md device.
  md: change type of first arg to sync_page_io.
  md/raid1: perform mem allocation before disabling writes during resync.
  md: use bio_kmalloc rather than bio_alloc when failure is acceptable.
  md: Fix possible deadlock with multiple mempool allocations.
  md: fix and update workqueue usage
  md: use sector_t in bitmap_get_counter
  md: remove md_mutex locking.
  md: Fix regression with raid1 arrays without persistent metadata.

13 years agoeCryptfs: Print mount_auth_tok_only param in ecryptfs_show_options
Tyler Hicks [Fri, 15 Oct 2010 21:43:41 +0000 (16:43 -0500)]
eCryptfs: Print mount_auth_tok_only param in ecryptfs_show_options

When printing mount options, print the new ecryptfs_mount_auth_tok_only
mount option.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoecryptfs: added ecryptfs_mount_auth_tok_only mount parameter
Roberto Sassu [Wed, 6 Oct 2010 16:31:32 +0000 (18:31 +0200)]
ecryptfs: added ecryptfs_mount_auth_tok_only mount parameter

This patch adds a new mount parameter 'ecryptfs_mount_auth_tok_only' to
force ecryptfs to use only authentication tokens which signature has
been specified at mount time with parameters 'ecryptfs_sig' and
'ecryptfs_fnek_sig'. In this way, after disabling the passthrough and
the encrypted view modes, it's possible to make available to users only
files encrypted with the specified authentication token.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: James Morris <jmorris@namei.org>
[Tyler: Clean up coding style errors found by checkpatch]
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()
Roberto Sassu [Wed, 6 Oct 2010 16:31:15 +0000 (18:31 +0200)]
ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()

This patch replaces the check of the 'matching_auth_tok' pointer with
the exit status of ecryptfs_find_auth_tok_for_sig().
This avoids to use authentication tokens obtained through the function
ecryptfs_keyring_auth_tok_for_sig which are not valid.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoecryptfs: release keys loaded in ecryptfs_keyring_auth_tok_for_sig()
Roberto Sassu [Wed, 6 Oct 2010 16:31:06 +0000 (18:31 +0200)]
ecryptfs: release keys loaded in ecryptfs_keyring_auth_tok_for_sig()

This patch allows keys requested in the function
ecryptfs_keyring_auth_tok_for_sig()to be released when they are no
longer required. In particular keys are directly released in the same
function if the obtained authentication token is not valid.

Further, a new function parameter 'auth_tok_key' has been added to
ecryptfs_find_auth_tok_for_sig() in order to provide callers the key
pointer to be passed to key_put().

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: James Morris <jmorris@namei.org>
[Tyler: Initialize auth_tok_key to NULL in ecryptfs_parse_packet_set]
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoeCryptfs: Clear LOOKUP_OPEN flag when creating lower file
Tyler Hicks [Thu, 23 Sep 2010 07:35:04 +0000 (02:35 -0500)]
eCryptfs: Clear LOOKUP_OPEN flag when creating lower file

eCryptfs was passing the LOOKUP_OPEN flag through to the lower file
system, even though ecryptfs_create() doesn't support the flag. A valid
filp for the lower filesystem could be returned in the nameidata if the
lower file system's create() function supported LOOKUP_OPEN, possibly
resulting in unencrypted writes to the lower file.

However, this is only a potential problem in filesystems (FUSE, NFS,
CIFS, CEPH, 9p) that eCryptfs isn't known to support today.

https://bugs.launchpad.net/ecryptfs/+bug/641703

Reported-by: Kevin Buhr
Cc: stable <stable@kernel.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoecryptfs: call vfs_setxattr() in ecryptfs_setxattr()
Roberto Sassu [Tue, 5 Oct 2010 16:53:45 +0000 (18:53 +0200)]
ecryptfs: call vfs_setxattr() in ecryptfs_setxattr()

Ecryptfs is a stackable filesystem which relies on lower filesystems the
ability of setting/getting extended attributes.

If there is a security module enabled on the system it updates the
'security' field of inodes according to the owned extended attribute set
with the function vfs_setxattr().  When this function is performed on a
ecryptfs filesystem the 'security' field is not updated for the lower
filesystem since the call security_inode_post_setxattr() is missing for
the lower inode.
Further, the call security_inode_setxattr() is missing for the lower inode,
leading to policy violations in the security module because specific
checks for this hook are not performed (i. e. filesystem
'associate' permission on SELinux is not checked for the lower filesystem).

This patch replaces the call of the setxattr() method of the lower inode
in the function ecryptfs_setxattr() with vfs_setxattr().

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Cc: stable <stable@kernel.org>
Cc: Dustin Kirkland <kirkland@canonical.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoBtrfs: fix raid code for removing missing drives
Chris Mason [Thu, 28 Oct 2010 19:30:42 +0000 (15:30 -0400)]
Btrfs: fix raid code for removing missing drives

When btrfs is mounted in degraded mode, it has some internal structures
to track the missing devices.  This missing device is setup as readonly,
but the mapping code can get upset when we try to write to it.

This changes the mapping code to return -EIO instead of oops when we try
to write to the readonly device.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: Switch the extent buffer rbtree into a radix tree
Miao Xie [Wed, 27 Oct 2010 00:57:29 +0000 (20:57 -0400)]
Btrfs: Switch the extent buffer rbtree into a radix tree

This patch reduces the CPU time spent in the extent buffer search by using the
radix tree instead of the rbtree and using the rcu lock instead of the spin
lock.

I did a quick test by the benchmark tool[1] and found the patch improve the
file creation/deletion performance problem that I have reported[2].

Before applying this patch:
Create files:
Total files: 50000
Total time: 0.971531
Average time: 0.000019
Delete files:
Total files: 50000
Total time: 1.366761
Average time: 0.000027

After applying this patch:
Create files:
Total files: 50000
Total time: 0.927455
Average time: 0.000019
Delete files:
Total files: 50000
Total time: 1.292280
Average time: 0.000026

[1] http://marc.info/?l=linux-btrfs&m=128212635122920&q=p3
[2] http://marc.info/?l=linux-btrfs&m=128212635122920&w=2

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: restructure try_release_extent_buffer()
Miao Xie [Wed, 27 Oct 2010 00:57:29 +0000 (20:57 -0400)]
Btrfs: restructure try_release_extent_buffer()

restructure try_release_extent_buffer() and write a function to release the
extent buffer. It will be used later.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: use the flusher threads for delalloc throttling
Chris Mason [Tue, 26 Oct 2010 17:40:45 +0000 (13:40 -0400)]
Btrfs: use the flusher threads for delalloc throttling

We have a fairly complex set of loops around walking our list of
delalloc inodes when we find metadata delalloc space running low.
It doesn't work very well, can use large amounts of CPU and doesn't
do very efficient writeback.

This switches us to kick the bdi flusher threads instead.  All dirty
data in btrfs is accounted as delalloc data, so this is very similar
in terms of what it writes, but we're able to just kick off the IO
and wait for progress.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: tune the chunk allocation to 5% of the FS as metadata
Chris Mason [Tue, 26 Oct 2010 17:37:56 +0000 (13:37 -0400)]
Btrfs: tune the chunk allocation to 5% of the FS as metadata

An earlier commit tried to keep us from allocating too many
empty metadata chunks.  It was somewhat too restrictive and could
lead to ENOSPC errors on empty filesystems.

This increases the limits to about 5% of the FS size, allowing more
metadata chunks to be preallocated.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoAdd new functions for triggering inode writeback
Chris Mason [Fri, 29 Oct 2010 15:16:17 +0000 (11:16 -0400)]
Add new functions for triggering inode writeback

When btrfs is running low on metadata space, it needs to force delayed
allocation pages to disk.  It currently does this with a suboptimal walk
of a private list of inodes with delayed allocation, and it would be
much better if we used the generic flusher threads.

writeback_inodes_sb_if_idle would be ideal, but it waits for the flusher
thread to start IO on all the dirty pages in the FS before it returns.
This adds variants of writeback_inodes_sb* that allow the caller to
control how many pages get sent down.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Fri, 29 Oct 2010 15:06:25 +0000 (08:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (29 commits)
  braino in internal.h
  convert simple cases of nfs-related ->get_sb() to ->mount()
  convert btrfs
  convert ceph
  convert gfs2
  convert afs
  convert ecryptfs
  convert sysfs
  convert cgroup and cpuset
  switch get_sb_ns() users
  switch procfs to ->mount()
  setting ->proc_mnt doesn't belong in proc_get_sb()
  convert cifs
  convert nilfs
  switch logfs to ->mount()
  logfs: fix a leak in get_sb
  logfs get_sb, part 3
  logfs get_sb, part 2
  logfs get_sb massage, part 1
  convert v9fs
  ...

13 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 29 Oct 2010 15:05:33 +0000 (08:05 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched_stat: Update sched_info_queue/dequeue() code comments
  sched, cgroup: Fixup broken cgroup movement

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 29 Oct 2010 15:03:48 +0000 (08:03 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  kbuild: add ARCH=sparc32 target
  sparc32: fix build failure on CONFIG_SPARC_LEON
  sparc: Fixed random SPARC/LEON SMP CPU Stuck problem.
  sparc32: remove CONFIG_HAVE_PERF_EVENTS option
  sparc: don't #include asm/system.h in asm/jump_label.h
  sparc32: Fix unaligned stack handling on trap return.
  sparc: keep calling do_signal() as long as pending signals remain

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Fri, 29 Oct 2010 15:03:30 +0000 (08:03 -0700)]
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide: clean up timed out request handling
  hpt366: fix clock turnaround
  hpt366: add debounce delay to cable_detect() method

13 years ago[S390] fix kprobes single stepping
Martin Schwidefsky [Fri, 29 Oct 2010 14:50:45 +0000 (16:50 +0200)]
[S390] fix kprobes single stepping

Fix kprobes after git commit 1e54622e0403891b10f2105663e0f9dd595a1f17
broke it. The kprobe_handler is now called with interrupts in the state
at the time of the breakpoint. The single step of the replaced instruction
is done with interrupts off which makes it necessary to enable and disable
the interupts in the kprobes code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] tape: fix dbf usage
Sebastian Ott [Fri, 29 Oct 2010 14:50:44 +0000 (16:50 +0200)]
[S390] tape: fix dbf usage

Get rid of the format string "%s" usage with volatile strings
to prevent use after free errors in the s390dbf.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd: provide a Sense Path Group ID ioctl
Stefan Weinhuber [Fri, 29 Oct 2010 14:50:43 +0000 (16:50 +0200)]
[S390] dasd: provide a Sense Path Group ID ioctl

The BIODASDSNID ioctl executes a 'Sense Path Group ID'
command on a DASD ECKD device. The returned path group data
allows user space programs to determine path state and
path group ID of the channel paths to the device.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] ftrace: select HAVE_C_RECORDMCOUNT
Heiko Carstens [Fri, 29 Oct 2010 14:50:42 +0000 (16:50 +0200)]
[S390] ftrace: select HAVE_C_RECORDMCOUNT

Select HAVE_C_RECORDMCOUNT for the fast C version of recordmcount.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] vdso: get rid of redefinition warnings
Heiko Carstens [Fri, 29 Oct 2010 14:50:41 +0000 (16:50 +0200)]
[S390] vdso: get rid of redefinition warnings

The CLOCK_* defines in asm-offsets.c are only used for the vdso code
however in the meantime they cause other trouble.
Just rename them to get permanently rid of this:

In file included from /home2/heicarst/linux-2.6/arch/s390/include/asm/asm-offsets.h:1:0,
                 from arch/s390/mm/fault.c:33:
include/generated/asm-offsets.h:53:0: warning: "CLOCK_REALTIME" redefined
include/linux/time.h:286:0: note: this is the location of the previous definition
include/generated/asm-offsets.h:54:0: warning: "CLOCK_MONOTONIC" redefined
include/linux/time.h:287:0: note: this is the location of the previous definition

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] facility detection: remove unused variable
Heiko Carstens [Fri, 29 Oct 2010 14:50:40 +0000 (16:50 +0200)]
[S390] facility detection: remove unused variable

arch/s390/kernel/early.c: In function 'setup_hpage':
arch/s390/kernel/early.c:285:15: warning: unused variable 'facilities'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] hypfs: Fix error handling in hypfs_diag initialization
Michael Holzheu [Fri, 29 Oct 2010 14:50:39 +0000 (16:50 +0200)]
[S390] hypfs: Fix error handling in hypfs_diag initialization

Fix the following two error handling bugs in hypfs_diag_init():
* No need for calling diag204_free_buffer()
* Initialize name table only in case of LPAR and prevent error message
  on non-LPAR systems.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] topology: fix cpu masks for topology=off case
Heiko Carstens [Fri, 29 Oct 2010 14:50:38 +0000 (16:50 +0200)]
[S390] topology: fix cpu masks for topology=off case

Fix cpu masks for 'topology=off' case. Folding of the scheduling domains
happen in such a way that everything belongs to the MC domain instead
of the CPU doimain.
This should fix a performance regression introduced with
eafd2b6d "[S390] topology: use default MC domain initializer" and also
makes sure we have the same behavious as if CONFIG_SCHED_MC was not
selected at all.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] topology: add SCHED_MC config option
Heiko Carstens [Fri, 29 Oct 2010 14:50:37 +0000 (16:50 +0200)]
[S390] topology: add SCHED_MC config option

This allows us to easily check for performance differences seen with
!CONFIG_SCHED_MC and topology=off.
Actually there shouldn't be any (besides a small overhead because of
additional code).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] Kconfig: add machine type number to code generation options
Heiko Carstens [Fri, 29 Oct 2010 14:50:36 +0000 (16:50 +0200)]
[S390] Kconfig: add machine type number to code generation options

Add machine type number to code generation options. Also clean up and
shorten quite a lot of help texts with respect to machine type and
architecture terminology.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] Add z196 machine type to setup_hwcaps
Heiko Carstens [Fri, 29 Oct 2010 14:50:35 +0000 (16:50 +0200)]
[S390] Add z196 machine type to setup_hwcaps

Add machine type for zEnterprise 196 to elf platform detection.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years agoBtrfs: don't loop forever on bad btree blocks
Chris Mason [Sun, 24 Oct 2010 15:01:27 +0000 (11:01 -0400)]
Btrfs: don't loop forever on bad btree blocks

When btrfs discovers the generation number in a btree block is
incorrect, it can loop forever without forcing the RAID
code to try a valid mirror, and without returning EIO.

This changes things to properly kick out the EIO.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoPM / Runtime: Fix typo in status comparison causing warning
Kevin Winchester [Fri, 29 Oct 2010 13:29:55 +0000 (15:29 +0200)]
PM / Runtime: Fix typo in status comparison causing warning

GCC version 4.5.1 gives the following warning:

drivers/base/power/runtime.c: In function ‘rpm_check_suspend_allowed’:
drivers/base/power/runtime.c:146:25: warning: comparison between ‘enum dpm_state’ and ‘enum rpm_status’

which seems to be a typo in that dev->power.runtime_status
should be compared instead of dev->power.status.

Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoMerge branch 'bug-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs...
Chris Mason [Fri, 29 Oct 2010 13:27:49 +0000 (09:27 -0400)]
Merge branch 'bug-fixes' of git://git./linux/kernel/git/josef/btrfs-work

Conflicts:
fs/btrfs/extent-tree.c

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: let the user know space caching is enabled
Josef Bacik [Thu, 28 Oct 2010 20:55:47 +0000 (16:55 -0400)]
Btrfs: let the user know space caching is enabled

If you mount -o space_cache, the option will be persistent across mounts, but to
make sure the user knows that they did this, emit a message telling them if they
didn't mount with -o space_cache but the feature is still used.

Signed-off-by: Josef Bacik <josef@redhat.com>
13 years agoBtrfs: Add a clear_cache mount option
Josef Bacik [Tue, 21 Sep 2010 18:21:34 +0000 (14:21 -0400)]
Btrfs: Add a clear_cache mount option

If something goes wrong with the free space cache we need a way to make sure
it's not loaded on mount and that it's cleared for everybody.  When you pass the
clear_cache option it will make it so all block groups are setup to be cleared,
which keeps them from being loaded and then they will be truncated when the
transaction is committed.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
13 years agoBtrfs: add support for mixed data+metadata block groups
Josef Bacik [Thu, 16 Sep 2010 20:19:09 +0000 (16:19 -0400)]
Btrfs: add support for mixed data+metadata block groups

There are just a few things that need to be fixed in the kernel to support mixed
data+metadata block groups.  Mostly we just need to make sure that if we are
using mixed block groups that we continue to allocate mixed block groups as we
need them.  Also we need to make sure __find_space_info will find our space info
if we search for DATA or METADATA only.  Tested this with xfstests and it works
nicely.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
13 years agoBtrfs: check cache->caching_ctl before returning if caching has started
Josef Bacik [Thu, 16 Sep 2010 20:17:03 +0000 (16:17 -0400)]
Btrfs: check cache->caching_ctl before returning if caching has started

With the free space disk caching we can mark the block group as started with the
caching, but we don't have a caching ctl.  This can race with anybody else who
tries to get the caching ctl before we cache (this is very hard to do btw).  So
instead check to see if cache->caching_ctl is set, and if not return NULL.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
13 years agoBtrfs: load free space cache if it exists
Josef Bacik [Wed, 25 Aug 2010 20:54:15 +0000 (16:54 -0400)]
Btrfs: load free space cache if it exists

This patch actually loads the free space cache if it exists.  The only thing
that really changes here is that we need to cache the block group if we're going
to remove an extent from it.  Previously we did not do this since the caching
kthread would pick it up.  With the on disk cache we don't have this luxury so
we need to make sure we read the on disk cache in first, and then remove the
extent, that way when the extent is unpinned the free space is added to the
block group.  This has been tested with all sorts of things.

Signed-off-by: Josef Bacik <josef@redhat.com>
13 years agoBtrfs: write out free space cache
Josef Bacik [Fri, 2 Jul 2010 16:14:14 +0000 (12:14 -0400)]
Btrfs: write out free space cache

This is a simple bit, just dump the free space cache out to our preallocated
inode when we're writing out dirty block groups.  There are a bunch of changes
in inode.c in order to account for special cases.  Mostly when we're doing the
writeout we're holding trans_mutex, so we need to use the nolock transacation
functions.  Also we can't do asynchronous completions since the async thread
could be blocked on already completed IO waiting for the transaction lock.  This
has been tested with xfstests and btrfs filesystem balance, as well as my ENOSPC
tests.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
13 years agooprofile: Remove deprecated use of flush_scheduled_work()
Tejun Heo [Fri, 15 Oct 2010 13:51:08 +0000 (09:51 -0400)]
oprofile: Remove deprecated use of flush_scheduled_work()

flush_scheduled_work() is deprecated and scheduled to be removed.
sync_stop() currently cancels cpu_buffer works inside buffer_mutex and
flushes the system workqueue outside.  Instead, split end_cpu_work()
into two parts - stopping further work enqueues and flushing works -
and do the former inside buffer_mutex and latter outside.

For stable kernels v2.6.35.y and v2.6.36.y.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Robert Richter <robert.richter@amd.com>
13 years agooprofile: Fix the hang while taking the cpu offline
Santosh Shilimkar [Wed, 27 Oct 2010 15:17:15 +0000 (11:17 -0400)]
oprofile: Fix the hang while taking the cpu offline

The kernel build with CONFIG_OPROFILE and CPU_HOTPLUG enabled.
The oprofile is initialised using system timer in absence of hardware
counters supports. Oprofile isn't started from userland.

In this setup while doing a CPU offline the kernel hangs in infinite
for loop inside lock_hrtimer_base() function

This happens because as part of oprofile_cpu_notify(, it tries to
stop an hrtimer which was never started. These per-cpu hrtimers
are started when the oprfile is started.
echo 1 > /dev/oprofile/enable

This problem also existwhen the cpu is booted with maxcpus parameter
set. When bringing the remaining cpus online the timers are started
even if oprofile is not yet enabled.

This patch fix this issue by adding a state variable so that
these hrtimer start/stop is only attempted when oprofile is
started

For stable kernels v2.6.35.y and v2.6.36.y.

Reported-by: Jan Sebastien <s-jan@ti.com>
Tested-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: stable@kernel.org
Signed-off-by: Robert Richter <robert.richter@amd.com>
13 years agobraino in internal.h
Al Viro [Fri, 29 Oct 2010 09:49:13 +0000 (05:49 -0400)]
braino in internal.h

wrong return type...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agotelephony: fix return value
Nicolas Kaiser [Fri, 29 Oct 2010 09:41:42 +0000 (11:41 +0200)]
telephony: fix return value

If copy_from_user fails, the return value gets overwritten.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoconvert simple cases of nfs-related ->get_sb() to ->mount()
Al Viro [Fri, 29 Oct 2010 07:38:12 +0000 (03:38 -0400)]
convert simple cases of nfs-related ->get_sb() to ->mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert btrfs
Al Viro [Mon, 26 Jul 2010 12:21:33 +0000 (16:21 +0400)]
convert btrfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert ceph
Al Viro [Mon, 26 Jul 2010 12:17:55 +0000 (16:17 +0400)]
convert ceph

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert gfs2
Al Viro [Mon, 26 Jul 2010 12:03:58 +0000 (16:03 +0400)]
convert gfs2

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert afs
Al Viro [Mon, 26 Jul 2010 10:16:21 +0000 (14:16 +0400)]
convert afs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert ecryptfs
Al Viro [Mon, 26 Jul 2010 09:33:36 +0000 (13:33 +0400)]
convert ecryptfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert sysfs
Al Viro [Mon, 26 Jul 2010 09:30:36 +0000 (13:30 +0400)]
convert sysfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert cgroup and cpuset
Al Viro [Mon, 26 Jul 2010 09:23:11 +0000 (13:23 +0400)]
convert cgroup and cpuset

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch get_sb_ns() users
Al Viro [Mon, 26 Jul 2010 09:16:50 +0000 (13:16 +0400)]
switch get_sb_ns() users

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch procfs to ->mount()
Al Viro [Mon, 26 Jul 2010 09:12:54 +0000 (13:12 +0400)]
switch procfs to ->mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosetting ->proc_mnt doesn't belong in proc_get_sb()
Al Viro [Mon, 26 Jul 2010 09:09:36 +0000 (13:09 +0400)]
setting ->proc_mnt doesn't belong in proc_get_sb()

take that to kern_mount_data()-using callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert cifs
Al Viro [Mon, 26 Jul 2010 08:52:33 +0000 (12:52 +0400)]
convert cifs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert nilfs
Al Viro [Mon, 26 Jul 2010 08:19:34 +0000 (12:19 +0400)]
convert nilfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch logfs to ->mount()
Al Viro [Mon, 26 Jul 2010 08:14:03 +0000 (12:14 +0400)]
switch logfs to ->mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs: fix a leak in get_sb
Al Viro [Mon, 26 Jul 2010 08:06:00 +0000 (12:06 +0400)]
logfs: fix a leak in get_sb

a) switch ->put_device() to logfs_super *
b) actually call it on early failures in logfs_get_sb_device()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs get_sb, part 3
Al Viro [Mon, 26 Jul 2010 07:53:30 +0000 (11:53 +0400)]
logfs get_sb, part 3

take logfs_get_sb_device() calls to logfs_get_sb() itself

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs get_sb, part 2
Al Viro [Mon, 26 Jul 2010 07:33:39 +0000 (11:33 +0400)]
logfs get_sb, part 2

take setting s_bdev/s_mtd/s_devops to callers of logfs_get_sb_device(),
don't bother passing them separately

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs get_sb massage, part 1
Al Viro [Mon, 26 Jul 2010 07:25:05 +0000 (11:25 +0400)]
logfs get_sb massage, part 1

move allocation of logfs_super to logfs_get_sb, pass it to
logfs_get_sb_...().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert v9fs
Al Viro [Sun, 25 Jul 2010 19:56:43 +0000 (23:56 +0400)]
convert v9fs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert ubifs
Al Viro [Sun, 25 Jul 2010 19:52:42 +0000 (23:52 +0400)]
convert ubifs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert get_sb_pseudo() users
Al Viro [Sun, 25 Jul 2010 19:47:46 +0000 (23:47 +0400)]
convert get_sb_pseudo() users

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert get_sb_nodev() users
Al Viro [Sun, 25 Jul 2010 07:46:36 +0000 (11:46 +0400)]
convert get_sb_nodev() users

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert get_sb_single() users
Al Viro [Sat, 24 Jul 2010 21:48:30 +0000 (01:48 +0400)]
convert get_sb_single() users

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoconvert get_sb_mtd() users to ->mount()
Al Viro [Sat, 24 Jul 2010 20:56:46 +0000 (00:56 +0400)]
convert get_sb_mtd() users to ->mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>