pandora-kernel.git
13 years agoMerge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
Linus Torvalds [Mon, 24 May 2010 14:57:41 +0000 (07:57 -0700)]
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd

* 'for-linus' of git://git.open-osd.org/linux-open-osd:
  exofs: confusion between kmap() and kmap_atomic() api
  exofs: Add default address_space_operations

13 years agoRevert "ath9k: Group Key fix for VAPs"
Linus Torvalds [Mon, 24 May 2010 14:45:43 +0000 (07:45 -0700)]
Revert "ath9k: Group Key fix for VAPs"

This reverts commit 03ceedea972a82d343fa5c2528b3952fa9e615d5, since it
breaks resume from suspend-to-ram on Rafael's Acer Ferrari One.
NetworkManager thinks everything is ok, but it can't connect to the AP
to get an IP address after the resume.

In fact, it even breaks resume for non-ath9k chipsets: reverting it also
fixes Rafael's Toshiba Protege R500 with the iwlagn driver.  As Johannes
says:

  "Indeed, this patch needs to be reverted. That mac80211 change is wrong
   and completely unnecessary."

Reported-and-requested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Daniel Yingqiang Ma <yma.cool@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6
Linus Torvalds [Mon, 24 May 2010 14:41:47 +0000 (07:41 -0700)]
Merge git://git./linux/kernel/git/hirofumi/fatfs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
  fat: convert to unlocked_ioctl
  fat: Cleanup nls_unload() usage
  fat: use pack_hex_byte() instead of custom one

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Mon, 24 May 2010 14:41:13 +0000 (07:41 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: Optimize TCREATE by eliminating a redundant fid clone.
  9p: cleanup: remove unneeded assignment
  9p: Add mksock support
  fs/9p: Make sure we properly instantiate dentry.
  9p: add 9P2000.L rename operation
  9p: add 9P2000.L statfs operation
  9p: VFS switches for 9p2000.L: VFS switches
  9p: VFS switches for 9p2000.L: protocol and client changes

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Mon, 24 May 2010 14:37:52 +0000 (07:37 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (59 commits)
  ceph: reuse mon subscribe message instead of allocated anew
  ceph: avoid resending queued message to monitor
  ceph: Storage class should be before const qualifier
  ceph: all allocation functions should get gfp_mask
  ceph: specify max_bytes on readdir replies
  ceph: cleanup pool op strings
  ceph: Use kzalloc
  ceph: use common helper for aborted dir request invalidation
  ceph: cope with out of order (unsafe after safe) mds reply
  ceph: save peer feature bits in connection structure
  ceph: resync headers with userland
  ceph: use ceph. prefix for virtual xattrs
  ceph: throw out dirty caps metadata, data on session teardown
  ceph: attempt mds reconnect if mds closes our session
  ceph: clean up send_mds_reconnect interface
  ceph: wait for mds OPEN reply to indicate reconnect success
  ceph: only send cap releases when mds is OPEN|HUNG
  ceph: dicard cap releases on mds restart
  ceph: make mon client statfs handling more generic
  ceph: drop src address(es) from message header [new protocol feature]
  ...

13 years agoMerge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Mon, 24 May 2010 14:37:38 +0000 (07:37 -0700)]
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6

* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
  of: change of_match_device to work with struct device
  of: Remove duplicate fields from of_platform_driver
  drivercore: Add of_match_table to the common device drivers
  arch/microblaze: Move dma_mask from of_device into pdev_archdata
  arch/powerpc: Move dma_mask from of_device into pdev_archdata
  of: eliminate of_device->node and dev_archdata->{of,prom}_node
  of: Always use 'struct device.of_node' to get device node pointer.
  i2c/of: Allow device node to be passed via i2c_board_info
  driver-core: Add device node pointer to struct device
  of: protect contents of of_platform.h and of_device.h
  of/flattree: Make unflatten_device_tree() safe to call from any arch
  of/flattree: make of_fdt.h safe to unconditionally include.

13 years agoMerge branch 'slab-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penber...
Linus Torvalds [Mon, 24 May 2010 14:33:43 +0000 (07:33 -0700)]
Merge branch 'slab-for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'slab-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: Use alloc_pages_exact_node() for page allocation
  slub: __kmalloc_node_track_caller should trace kmalloc_large_node case
  slub: Potential stack overflow
  crypto: Use ARCH_KMALLOC_MINALIGN for CRYPTO_MINALIGN now that it's exposed
  mm: Move ARCH_SLAB_MINALIGN and ARCH_KMALLOC_MINALIGN to <linux/slub_def.h>
  mm: Move ARCH_SLAB_MINALIGN and ARCH_KMALLOC_MINALIGN to <linux/slob_def.h>
  mm: Move ARCH_SLAB_MINALIGN and ARCH_KMALLOC_MINALIGN to <linux/slab_def.h>
  slab: Fix missing DEBUG_SLAB last user
  slab: add memory hotplug support
  slab: Fix continuation lines

13 years agoDocumentation: update SubmitChecklist for O=objdir and kconfig testing
Randy Dunlap [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
Documentation: update SubmitChecklist for O=objdir and kconfig testing

Add build testing using 'O=builddir'.

Add build testing with various kconfig symbols disabled, listing
common ones that are known to cause build problems.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofusion: fix kernel-doc notation
Ben Hutchings [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
fusion: fix kernel-doc notation

The function name must be followed by a space, hypen, space, and a
short description.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoscsi_scan.c: fix/convert functions to use kernel-doc
Randy Dunlap [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
scsi_scan.c: fix/convert functions to use kernel-doc

scsi_scan.c: fix incorrectly formatted kernel-doc notation
& convert documentation of 2 functions into kernel-doc.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/vm: use better value for MAP_HUGETLB
Carlo Marcelo Arenas Belon [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
Documentation/vm: use better value for MAP_HUGETLB

documentation: slightly more correct value for MAP_HUGETLB in map_hugetlb.c

still not correct for alpha, mips, parisc or xtensa but working out of
the box in the most common architectures without having to deal with
complicated macros or including architecture specific headers.

Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/timers/hpet_example: drop duplicate header files
Andrea Gelmini [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
Documentation/timers/hpet_example: drop duplicate header files

Documentation/timers/hpet_example.c: fcntl.h is included more than once.
Documentation/timers/hpet_example.c: signal.h is included more than once.

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/development-process: add staging & mmotm info
Randy Dunlap [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
Documentation/development-process: add staging & mmotm info

Update explanation of mmotm.
Add explanation of drivers/staging/.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/development-process: add maintainers and git info
Randy Dunlap [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
Documentation/development-process: add maintainers and git info

Add info on maintainers and persistent posting.
Update git home page.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodocbook: make mtd nand module init static
H Hartley Sweeten [Mon, 24 May 2010 00:02:30 +0000 (17:02 -0700)]
docbook: make mtd nand module init static

In the example the module_init function should be static.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago9p: Optimize TCREATE by eliminating a redundant fid clone.
Venkateswararao Jujjuri [Mon, 10 May 2010 18:08:28 +0000 (18:08 +0000)]
9p: Optimize TCREATE by eliminating a redundant fid clone.

This patch removes a redundant fid clone on the directory fid and hence
reduces a server transaction while creating new filesystem object.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: cleanup: remove unneeded assignment
Dan Carpenter [Fri, 7 May 2010 08:26:23 +0000 (08:26 +0000)]
9p: cleanup: remove unneeded assignment

We never use "v9ses" and so we can remove it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years ago9p: Add mksock support
Venkateswararao Jujjuri [Sat, 22 May 2010 17:20:30 +0000 (12:20 -0500)]
9p: Add mksock support

Without this patch, an attempt to mksock will get an EINVAL.

Before this patch:
[root@localhost 1dir]# mksock mysock
mksock: error making mysock: Invalid argument

With this patch:
[root@localhost 1dir]# mksock mysock
[root@localhost 1dir]# ls    -l mysock
s--------- 1 root root 0 2010-03-31 17:44 mysock

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agofs/9p: Make sure we properly instantiate dentry.
Aneesh Kumar K.V [Fri, 14 May 2010 13:04:39 +0000 (13:04 +0000)]
fs/9p: Make sure we properly instantiate dentry.

For lookup if we get ENOENT error from the server we still
instantiate the dentry. We need to make sure we have dentry
operations set in that case so that a later dput on the dentry
does the expected. Without the patch we get the below error

#ln  -sf abc abclink
ln: creating symbolic link `abclink': No such file or directory

Now on the host do
$ touch abclink

Guest now gives ENOENT error.
# ls
ls: cannot access abclink: No such file or directory

Debugged-by:Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
13 years agoMerge branches 'slab/align', 'slab/cleanups', 'slab/fixes', 'slab/memhotadd' and...
Pekka Enberg [Sat, 22 May 2010 07:57:52 +0000 (10:57 +0300)]
Merge branches 'slab/align', 'slab/cleanups', 'slab/fixes', 'slab/memhotadd' and 'slub/fixes' into slab-for-linus

13 years agoslub: Use alloc_pages_exact_node() for page allocation
Minchan Kim [Wed, 14 Apr 2010 14:58:36 +0000 (23:58 +0900)]
slub: Use alloc_pages_exact_node() for page allocation

The alloc_slab_page() in SLUB uses alloc_pages() if node is '-1'.  This means
that node validity check in alloc_pages_node is unnecessary and we can use
alloc_pages_exact_node() to avoid comparison and branch as commit
6484eb3e2a81807722 ("page allocator: do not check NUMA node ID when the caller
knows the node is valid") did for the page allocator.

Cc: Christoph Lameter <cl@linux-foundation.org>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
13 years agoslub: __kmalloc_node_track_caller should trace kmalloc_large_node case
Xiaotian Feng [Thu, 8 Apr 2010 09:26:44 +0000 (17:26 +0800)]
slub: __kmalloc_node_track_caller should trace kmalloc_large_node case

commit 94b528d (kmemtrace: SLUB hooks for caller-tracking functions)
missed tracing kmalloc_large_node in __kmalloc_node_track_caller. We
should trace it same as __kmalloc_node.

Acked-by: David Rientjes <rientjes@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
13 years agoslub: Potential stack overflow
Eric Dumazet [Wed, 24 Mar 2010 21:25:47 +0000 (22:25 +0100)]
slub: Potential stack overflow

I discovered that we can overflow stack if CONFIG_SLUB_DEBUG=y and use slabs
with many objects, since list_slab_objects() and process_slab() use
DECLARE_BITMAP(map, page->objects).

With 65535 bits, we use 8192 bytes of stack ...

Switch these allocations to dynamic allocations.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
13 years agoMerge remote branch 'origin' into secretlab/next-devicetree
Grant Likely [Sat, 22 May 2010 06:36:56 +0000 (00:36 -0600)]
Merge remote branch 'origin' into secretlab/next-devicetree

Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.

Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c

Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoof: change of_match_device to work with struct device
Grant Likely [Tue, 13 Apr 2010 23:13:22 +0000 (16:13 -0700)]
of: change of_match_device to work with struct device

The of_node pointer is now stored directly in struct device, so
of_match_device() should work with any device, not just struct of_device.

This patch changes the interface to of_match_device() to accept a
struct device instead of struct of_device.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoof: Remove duplicate fields from of_platform_driver
Grant Likely [Tue, 13 Apr 2010 23:13:02 +0000 (16:13 -0700)]
of: Remove duplicate fields from of_platform_driver

.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver.  This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.

This patch is a pretty mechanical change.  The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial.  This patch looks big and scary because it touches so
many files, but it should be pretty safe.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
13 years agodrivercore: Add of_match_table to the common device drivers
Grant Likely [Tue, 13 Apr 2010 23:13:01 +0000 (16:13 -0700)]
drivercore: Add of_match_table to the common device drivers

OF-style matching can be available to any device, on any type of bus.
This patch allows any driver to provide an OF match table when CONFIG_OF
is enabled so that drivers can be bound against devices described in
the device tree.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoarch/microblaze: Move dma_mask from of_device into pdev_archdata
Grant Likely [Tue, 13 Apr 2010 23:13:00 +0000 (16:13 -0700)]
arch/microblaze: Move dma_mask from of_device into pdev_archdata

By moving dma_mask into pdev_archdata, and adding archdata to
struct of_device, it makes it possible to substitute of_device
with struct platform_device, which is a stepping stone to
removing the of_platform bus entirely.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoarch/powerpc: Move dma_mask from of_device into pdev_archdata
Grant Likely [Tue, 13 Apr 2010 23:12:59 +0000 (16:12 -0700)]
arch/powerpc: Move dma_mask from of_device into pdev_archdata

By moving dma_mask into pdev_archdata, and adding archdata to
struct of_device, it makes it possible to substitute of_device
with struct platform_device, which is a stepping stone to
removing the of_platform bus entirely.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agofbmem: avoid printk format warning with 32-bit resources
Randy Dunlap [Fri, 21 May 2010 19:44:47 +0000 (12:44 -0700)]
fbmem: avoid printk format warning with 32-bit resources

Fix printk formats:

  drivers/video/fbmem.c: In function 'fb_do_apertures_overlap':
  drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
  drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'resource_size_t'
  drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
  drivers/video/fbmem.c:1494: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agolinux/elfcore.h: hide kernel functions
Roland McGrath [Sat, 22 May 2010 03:16:50 +0000 (20:16 -0700)]
linux/elfcore.h: hide kernel functions

The declarations for elf_core_extra_phdrs() et al got added on the
wrong side of #ifdef __KERNEL__ in linux/elfcore.h so they leak into
the user header copy and we get a warning at build time about it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Sat, 22 May 2010 02:37:45 +0000 (19:37 -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: (69 commits)
  fix handling of offsets in cris eeprom.c, get rid of fake on-stack files
  get rid of home-grown mutex in cris eeprom.c
  switch ecryptfs_write() to struct inode *, kill on-stack fake files
  switch ecryptfs_get_locked_page() to struct inode *
  simplify access to ecryptfs inodes in ->readpage() and friends
  AFS: Don't put struct file on the stack
  Ban ecryptfs over ecryptfs
  logfs: replace inode uid,gid,mode initialization with helper function
  ufs: replace inode uid,gid,mode initialization with helper function
  udf: replace inode uid,gid,mode init with helper
  ubifs: replace inode uid,gid,mode initialization with helper function
  sysv: replace inode uid,gid,mode initialization with helper function
  reiserfs: replace inode uid,gid,mode initialization with helper function
  ramfs: replace inode uid,gid,mode initialization with helper function
  omfs: replace inode uid,gid,mode initialization with helper function
  bfs: replace inode uid,gid,mode initialization with helper function
  ocfs2: replace inode uid,gid,mode initialization with helper function
  nilfs2: replace inode uid,gid,mode initialization with helper function
  minix: replace inode uid,gid,mode init with helper
  ext4: replace inode uid,gid,mode init with helper
  ...

Trivial conflict in fs/fs-writeback.c (mark bitfields unsigned)

13 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Sat, 22 May 2010 01:58:52 +0000 (18:58 -0700)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (36 commits)
  PCI: hotplug: pciehp: Removed check for hotplug of display devices
  PCI: read memory ranges out of Broadcom CNB20LE host bridge
  PCI: Allow manual resource allocation for PCI hotplug bridges
  x86/PCI: make ACPI MCFG reserved error messages ACPI specific
  PCI hotplug: Use kmemdup
  PM/PCI: Update PCI power management documentation
  PCI: output FW warning in pci_read/write_vpd
  PCI: fix typos pci_device_dis/enable to pci_dis/enable_device in comments
  PCI quirks: disable msi on AMD rs4xx internal gfx bridges
  PCI: Disable MSI for MCP55 on P5N32-E SLI
  x86/PCI: irq and pci_ids patch for additional Intel Cougar Point DeviceIDs
  PCI: aerdrv: trivial cleanup for aerdrv_core.c
  PCI: aerdrv: trivial cleanup for aerdrv.c
  PCI: aerdrv: introduce default_downstream_reset_link
  PCI: aerdrv: rework find_aer_service
  PCI: aerdrv: remove is_downstream
  PCI: aerdrv: remove magical ROOT_ERR_STATUS_MASKS
  PCI: aerdrv: redefine PCI_ERR_ROOT_*_SRC
  PCI: aerdrv: rework do_recovery
  PCI: aerdrv: rework get_e_source()
  ...

13 years agoMerge git://git.infradead.org/iommu-2.6
Linus Torvalds [Sat, 22 May 2010 00:25:01 +0000 (17:25 -0700)]
Merge git://git.infradead.org/iommu-2.6

* git://git.infradead.org/iommu-2.6:
  intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables
  intel-iommu: Combine the BIOS DMAR table warning messages
  panic: Add taint flag TAINT_FIRMWARE_WORKAROUND ('I')
  panic: Allow warnings to set different taint flags
  intel-iommu: intel_iommu_map_range failed at very end of address space
  intel-iommu: errors with smaller iommu widths
  intel-iommu: Fix boot inside 64bit virtualbox with io-apic disabled
  intel-iommu: use physfn to search drhd for VF
  intel-iommu: Print out iommu seq_id
  intel-iommu: Don't complain that ACPI_DMAR_SCOPE_TYPE_IOAPIC is not supported
  intel-iommu: Avoid global flushes with caching mode.
  intel-iommu: Use correct domain ID when caching mode is enabled
  intel-iommu mistakenly uses offset_pfn when caching mode is enabled
  intel-iommu: use for_each_set_bit()
  intel-iommu: Fix section mismatch dmar_ir_support() uses dmar_tbl.

13 years agoMerge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Linus Torvalds [Sat, 22 May 2010 00:22:52 +0000 (17:22 -0700)]
Merge branch 'virtio' of git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (27 commits)
  drivers/char: Eliminate use after free
  virtio: console: Accept console size along with resize control message
  virtio: console: Store each console's size in the console structure
  virtio: console: Resize console port 0 on config intr only if multiport is off
  virtio: console: Add support for nonblocking write()s
  virtio: console: Rename wait_is_over() to will_read_block()
  virtio: console: Don't always create a port 0 if using multiport
  virtio: console: Use a control message to add ports
  virtio: console: Move code around for future patches
  virtio: console: Remove config work handler
  virtio: console: Don't call hvc_remove() on unplugging console ports
  virtio: console: Return -EPIPE to hvc_console if we lost the connection
  virtio: console: Let host know of port or device add failures
  virtio: console: Add a __send_control_msg() that can send messages without a valid port
  virtio: Revert "virtio: disable multiport console support."
  virtio: add_buf_gfp
  trans_virtio: use virtqueue_xxx wrappers
  virtio-rng: use virtqueue_xxx wrappers
  virtio_ring: remove a level of indirection
  virtio_net: use virtqueue_xxx wrappers
  ...

Fix up conflicts in drivers/net/virtio_net.c due to new virtqueue_xxx
wrappers changes conflicting with some other cleanups.

13 years agoMerge branch 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sat, 22 May 2010 00:16:21 +0000 (17:16 -0700)]
Merge branch 'kvm-updates/2.6.35' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (269 commits)
  KVM: x86: Add missing locking to arch specific vcpu ioctls
  KVM: PPC: Add missing vcpu_load()/vcpu_put() in vcpu ioctls
  KVM: MMU: Segregate shadow pages with different cr0.wp
  KVM: x86: Check LMA bit before set_efer
  KVM: Don't allow lmsw to clear cr0.pe
  KVM: Add cpuid.txt file
  KVM: x86: Tell the guest we'll warn it about tsc stability
  x86, paravirt: don't compute pvclock adjustments if we trust the tsc
  x86: KVM guest: Try using new kvm clock msrs
  KVM: x86: export paravirtual cpuid flags in KVM_GET_SUPPORTED_CPUID
  KVM: x86: add new KVMCLOCK cpuid feature
  KVM: x86: change msr numbers for kvmclock
  x86, paravirt: Add a global synchronization point for pvclock
  x86, paravirt: Enable pvclock flags in vcpu_time_info structure
  KVM: x86: Inject #GP with the right rip on efer writes
  KVM: SVM: Don't allow nested guest to VMMCALL into host
  KVM: x86: Fix exception reinjection forced to true
  KVM: Fix wallclock version writing race
  KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots
  KVM: VMX: enable VMXON check with SMX enabled (Intel TXT)
  ...

13 years agoMerge branch 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Linus Torvalds [Sat, 22 May 2010 00:15:44 +0000 (17:15 -0700)]
Merge branch 'modules' of git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: drop the lock while waiting for module to complete initialization.
  MODULE_DEVICE_TABLE(isapnp, ...) does nothing
  hisax_fcpcipnp: fix broken isapnp device table.
  isapnp: move definitions to mod_devicetable.h so file2alias can reach them.

13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Sat, 22 May 2010 00:13:24 +0000 (17:13 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (32 commits)
  Move N014, N051 and CR620 dmi information to load scm dmi table
  drivers/platform/x86/eeepc-wmi.c: fix build warning
  X86 platfrom wmi: Add debug facility to dump WMI data in a readable way
  X86 platform wmi: Also log GUID string when an event happens and debug is set
  X86 platform wmi: Introduce debug param to log all WMI events
  Clean up all objects used by scm model when driver initial fail or exit
  msi-laptop: fix up some coding style issues found by checkpatch
  msi-laptop: Add i8042 filter to sync sw state with BIOS when function key pressed
  msi-laptop: Set rfkill init state when msi-laptop intiial
  msi-laptop: Add MSI CR620 notebook dmi information to scm models table
  msi-laptop: Add N014 N051 dmi information to scm models table
  drivers/platform/x86: Use kmemdup
  drivers/platform/x86: Use kzalloc
  drivers/platform/x86: Clarify the MRST IPC driver description slightly
  eeepc-wmi: depends on BACKLIGHT_CLASS_DEVICE
  IPC driver for Intel Mobile Internet Device (MID) platforms
  classmate-laptop: Add RFKILL support.
  thinkpad-acpi: document backlight level writeback at driver init
  thinkpad-acpi: clean up ACPI handles handling
  thinkpad-acpi: don't depend on led_path for led firmware type (v2)
  ...

13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Sat, 22 May 2010 00:05:46 +0000 (17:05 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/djbw/async_tx

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  DMAENGINE: extend the control command to include an arg
  async_tx: trim dma_async_tx_descriptor in 'no channel switch' case
  DMAENGINE: DMA40 fix for allocation of logical channel 0
  DMAENGINE: DMA40 support paused channel status
  dmaengine: mpc512x: Use resource_size
  DMA ENGINE: Do not reset 'private' of channel
  ioat: Remove duplicated devm_kzalloc() calls for ioatdma_device
  ioat3: disable cacheline-unaligned transfers for raid operations
  ioat2,3: convert to producer/consumer locking
  ioat: convert to circ_buf
  DMAENGINE: Support for ST-Ericssons DMA40 block v3
  async_tx: use of kzalloc/kfree requires the include of slab.h
  dmaengine: provide helper for setting txstate
  DMAENGINE: generic channel status v2
  DMAENGINE: generic slave control v2
  dma: timb-dma: Update comment and fix compiler warning
  dma: Add timb-dma
  DMAENGINE: COH 901 318 fix bytesleft
  DMAENGINE: COH 901 318 rename confusing vars

13 years agoceph: reuse mon subscribe message instead of allocated anew
Sage Weil [Fri, 21 May 2010 21:57:25 +0000 (14:57 -0700)]
ceph: reuse mon subscribe message instead of allocated anew

Use the same message, allocated during startup.  No need to reallocate a
new one each time around (and potentially ENOMEM).

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Fri, 21 May 2010 22:49:14 +0000 (15:49 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md: (45 commits)
  md: don't insist on valid event count for spare devices.
  md: simplify updating of event count to sometimes avoid updating spares.
  md/raid6: Fix raid-6 read-error correction in degraded state
  md: restore ability of spare drives to spin down.
  md: Fix read balancing in RAID1 and RAID10 on drives > 2TB
  md/linear: standardise all printk messages
  md/raid0: tidy up printk messages.
  md/raid10: tidy up printk messages.
  md/raid1: improve printk messages
  md/raid5: improve consistency of error messages.
  md: remove EXPERIMENTAL designation from RAID10
  md: allow integers to be passed to md/level
  md: notify mdstat waiters of level change
  md/raid4: permit raid0 takeover
  md/raid1: delay reads that could overtake behind-writes.
  md/raid1: fix confusing 'redirect sector' message.
  md: don't unregister the thread in mddev_suspend
  md: factor out init code for an mddev
  md: pass mddev to make_request functions rather than request_queue
  md: call md_stop_writes from md_stop
  ...

13 years agoMerge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus
NeilBrown [Fri, 21 May 2010 22:31:36 +0000 (08:31 +1000)]
Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus

Conflicts:
drivers/md/md.c

- Resolved conflict in md_update_sb
- Added extra 'NULL' arg to new instance of sysfs_get_dirent.

Signed-off-by: NeilBrown <neilb@suse.de>
13 years agofix handling of offsets in cris eeprom.c, get rid of fake on-stack files
Al Viro [Fri, 21 May 2010 15:26:35 +0000 (11:26 -0400)]
fix handling of offsets in cris eeprom.c, get rid of fake on-stack files

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoget rid of home-grown mutex in cris eeprom.c
Al Viro [Fri, 21 May 2010 15:19:18 +0000 (11:19 -0400)]
get rid of home-grown mutex in cris eeprom.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch ecryptfs_write() to struct inode *, kill on-stack fake files
Al Viro [Fri, 21 May 2010 15:09:58 +0000 (11:09 -0400)]
switch ecryptfs_write() to struct inode *, kill on-stack fake files

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch ecryptfs_get_locked_page() to struct inode *
Al Viro [Fri, 21 May 2010 15:02:14 +0000 (11:02 -0400)]
switch ecryptfs_get_locked_page() to struct inode *

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosimplify access to ecryptfs inodes in ->readpage() and friends
Al Viro [Fri, 21 May 2010 14:56:12 +0000 (10:56 -0400)]
simplify access to ecryptfs inodes in ->readpage() and friends

we can get to them from page->mapping->host, no need to mess with
file.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoAFS: Don't put struct file on the stack
Al Viro [Fri, 21 May 2010 14:27:09 +0000 (15:27 +0100)]
AFS: Don't put struct file on the stack

Don't put struct file on the stack as it takes up quite a lot of space
and violates lifetime rules for struct file.

Rather than calling afs_readpage() indirectly from the directory routines by
way of read_mapping_page(), split afs_readpage() to have afs_page_filler()
that's given a key instead of a file and call read_cache_page(), specifying the
new function directly.  Use it in afs_readpages() as well.

Also make use of this in afs_mntpt_check_symlink() too for the same reason.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
13 years agoBan ecryptfs over ecryptfs
Al Viro [Mon, 17 May 2010 04:59:46 +0000 (00:59 -0400)]
Ban ecryptfs over ecryptfs

This is a seriously simplified patch from Eric Sandeen; copy of
rationale follows:
===
  mounting stacked ecryptfs on ecryptfs has been shown to lead to bugs
  in testing.  For crypto info in xattr, there is no mechanism for handling
  this at all, and for normal file headers, we run into other trouble:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
  IP: [<ffffffffa015b0b3>] ecryptfs_d_revalidate+0x43/0xa0 [ecryptfs]
  ...

  There doesn't seem to be any good usecase for this, so I'd suggest just
  disallowing the configuration.

  Based on a patch originally, I believe, from Mike Halcrow.
===

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agologfs: replace inode uid,gid,mode initialization with helper function
Al Viro [Sat, 15 May 2010 08:02:54 +0000 (04:02 -0400)]
logfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoufs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:23 +0000 (17:32 +0300)]
ufs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoudf: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:22 +0000 (17:32 +0300)]
udf: replace inode uid,gid,mode init with helper

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoubifs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:21 +0000 (17:32 +0300)]
ubifs: replace inode uid,gid,mode initialization with helper function

Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosysv: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:20 +0000 (17:32 +0300)]
sysv: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoreiserfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:19 +0000 (17:32 +0300)]
reiserfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoramfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:18 +0000 (17:32 +0300)]
ramfs: replace inode uid,gid,mode initialization with helper function

- seems what ramfs_get_inode is only locally, make it static.
[AV: the hell it is; it's used by shmem, so shmem needed conversion too
and no, that function can't be made static]

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoomfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:17 +0000 (17:32 +0300)]
omfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:46 +0000 (17:31 +0300)]
bfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoocfs2: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:16 +0000 (17:32 +0300)]
ocfs2: replace inode uid,gid,mode initialization with helper function

Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonilfs2: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:15 +0000 (17:32 +0300)]
nilfs2: replace inode uid,gid,mode initialization with helper function

Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agominix: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:32:14 +0000 (17:32 +0300)]
minix: replace inode uid,gid,mode init with helper

- also redesign minix_new_inode interface

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext4: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:51 +0000 (17:31 +0300)]
ext4: replace inode uid,gid,mode init with helper

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext3: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:50 +0000 (17:31 +0300)]
ext3: replace inode uid,gid,mode init with helper

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext2: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:49 +0000 (17:31 +0300)]
ext2: replace inode uid,gid,mode init with helper

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoexofs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:48 +0000 (17:31 +0300)]
exofs: replace inode uid,gid,mode initialization with helper function

Ack-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobtrfs: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:31:47 +0000 (17:31 +0300)]
btrfs: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agojfs: replace inode uid,gid,mode init with helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:30:58 +0000 (17:30 +0300)]
jfs: replace inode uid,gid,mode init with helper

Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years ago9p: replace inode uid,gid,mode initialization with helper function
Dmitry Monakhov [Thu, 4 Mar 2010 14:30:57 +0000 (17:30 +0300)]
9p: replace inode uid,gid,mode initialization with helper function

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: Add inode uid,gid,mode init helper
Dmitry Monakhov [Thu, 4 Mar 2010 14:29:14 +0000 (17:29 +0300)]
vfs: Add inode uid,gid,mode init helper

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs-writeback.c: bitfields should be unsigned
H Hartley Sweeten [Fri, 2 Apr 2010 01:36:30 +0000 (20:36 -0500)]
fs-writeback.c: bitfields should be unsigned

This fixes sparse noise:
  error: dubious one-bit signed bitfield

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonamei.c : update mnt when it needed
Huang Shijie [Fri, 2 Apr 2010 09:37:13 +0000 (17:37 +0800)]
namei.c : update mnt when it needed

update the mnt of the path when it is not equal to the new one.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: add lockdep annotation to s_vfs_rename_key for ecryptfs
Roland Dreier [Tue, 27 Apr 2010 21:23:57 +0000 (14:23 -0700)]
vfs: add lockdep annotation to s_vfs_rename_key for ecryptfs

 >  =============================================
 >  [ INFO: possible recursive locking detected ]
 >  2.6.31-2-generic #14~rbd3
 >  ---------------------------------------------
 >  firefox-3.5/4162 is trying to acquire lock:
 >   (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >
 >  but task is already holding lock:
 >   (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >
 >  other info that might help us debug this:
 >  3 locks held by firefox-3.5/4162:
 >   #0:  (&s->s_vfs_rename_mutex){+.+.+.}, at: [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >   #1:  (&sb->s_type->i_mutex_key#11/1){+.+.+.}, at: [<ffffffff81139d5a>] lock_rename+0x6a/0xf0
 >   #2:  (&sb->s_type->i_mutex_key#11/2){+.+.+.}, at: [<ffffffff81139d6f>] lock_rename+0x7f/0xf0
 >
 >  stack backtrace:
 >  Pid: 4162, comm: firefox-3.5 Tainted: G         C 2.6.31-2-generic #14~rbd3
 >  Call Trace:
 >   [<ffffffff8108ae74>] print_deadlock_bug+0xf4/0x100
 >   [<ffffffff8108ce26>] validate_chain+0x4c6/0x750
 >   [<ffffffff8108d2e7>] __lock_acquire+0x237/0x430
 >   [<ffffffff8108d585>] lock_acquire+0xa5/0x150
 >   [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
 >   [<ffffffff815526ad>] __mutex_lock_common+0x4d/0x3d0
 >   [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
 >   [<ffffffff81139d31>] ? lock_rename+0x41/0xf0
 >   [<ffffffff8120eaf9>] ? ecryptfs_rename+0x99/0x170
 >   [<ffffffff81552b36>] mutex_lock_nested+0x46/0x60
 >   [<ffffffff81139d31>] lock_rename+0x41/0xf0
 >   [<ffffffff8120eb2a>] ecryptfs_rename+0xca/0x170
 >   [<ffffffff81139a9e>] vfs_rename_dir+0x13e/0x160
 >   [<ffffffff8113ac7e>] vfs_rename+0xee/0x290
 >   [<ffffffff8113c212>] ? __lookup_hash+0x102/0x160
 >   [<ffffffff8113d512>] sys_renameat+0x252/0x280
 >   [<ffffffff81133eb4>] ? cp_new_stat+0xe4/0x100
 >   [<ffffffff8101316a>] ? sysret_check+0x2e/0x69
 >   [<ffffffff8108c34d>] ? trace_hardirqs_on_caller+0x14d/0x190
 >   [<ffffffff8113d55b>] sys_rename+0x1b/0x20
 >   [<ffffffff81013132>] system_call_fastpath+0x16/0x1b

The trace above is totally reproducible by doing a cross-directory
rename on an ecryptfs directory.

The issue seems to be that sys_renameat() does lock_rename() then calls
into the filesystem; if the filesystem is ecryptfs, then
ecryptfs_rename() again does lock_rename() on the lower filesystem, and
lockdep can't tell that the two s_vfs_rename_mutexes are different.  It
seems an annotation like the following is sufficient to fix this (it
does get rid of the lockdep trace in my simple tests); however I would
like to make sure I'm not misunderstanding the locking, hence the CC
list...

Signed-off-by: Roland Dreier <rdreier@cisco.com>
Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs/partitions: use ADDPART_FLAG_RAID instead of magic number
Cesar Eduardo Barros [Sat, 17 Apr 2010 22:28:09 +0000 (19:28 -0300)]
fs/partitions: use ADDPART_FLAG_RAID instead of magic number

ADDPART_FLAG_RAID was introduced in commit d18d768, and most places were
converted to use it instead of a hardcoded value. However, some places seem
to have been missed.

Change all of them to the symbolic names via the following semantic patch:

@@
struct parsed_partitions *state;
expression E;
@@
(
- state->parts[E].flags = 1
+ state->parts[E].flags = ADDPART_FLAG_RAID
|
- state->parts[E].flags |= 1
+ state->parts[E].flags |= ADDPART_FLAG_RAID
|
- state->parts[E].flags = 2
+ state->parts[E].flags = ADDPART_FLAG_WHOLEDISK
|
- state->parts[E].flags |= 2
+ state->parts[E].flags |= ADDPART_FLAG_WHOLEDISK
)

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosanitize vfs_fsync calling conventions
Christoph Hellwig [Mon, 22 Mar 2010 16:32:25 +0000 (17:32 +0100)]
sanitize vfs_fsync calling conventions

Now that the last user passing a NULL file pointer is gone we can remove
the redundant dentry argument and associated hacks inside vfs_fsynmc_range.

The next step will be removig the dentry argument from ->fsync, but given
the luck with the last round of method prototype changes I'd rather
defer this until after the main merge window.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonfsd: open a file descriptor for fsync in nfs4 recovery
Christoph Hellwig [Mon, 22 Mar 2010 16:32:14 +0000 (17:32 +0100)]
nfsd: open a file descriptor for fsync in nfs4 recovery

Instead of just looking up a path use do_filp_open to get us a file
structure for the nfs4 recovery directory.  This allows us to get
rid of the last non-standard vfs_fsync caller with a NULL file
pointer.

[AV: should be using fput(), not filp_close()]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: inode.c use atomic_inc_return in __iget
Richard Kennedy [Fri, 14 May 2010 09:49:22 +0000 (10:49 +0100)]
fs: inode.c use atomic_inc_return in __iget

Using atomic_inc_return in __iget(struct inode *inode) makes the intent
of this code clearer and generates less code on processors that have
this operation.

On x86_64 this patch reduces the text size of inode.o by 12 bytes.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
----
patch against 2.6.34-rc7
compiled & tested on x86_64 AMD X2

I've been running with this patch applied for several weeks with no
obvious problems.
regards
Richard
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoanon_inode: set S_IFREG on the anon_inode
Eric Paris [Fri, 14 May 2010 15:44:10 +0000 (11:44 -0400)]
anon_inode: set S_IFREG on the anon_inode

anon_inode_mkinode() sets inode->i_mode = S_IRUSR | S_IWUSR;  This means
that (inode->i_mode & S_IFMT) == 0.  This trips up some SELinux code that
needs to determine if a given inode is a regular file, a directory, etc.
The easiest solution is to just make sure that the anon_inode also sets
S_IFREG.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agogfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:23 +0000 (17:53 -0700)]
gfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoocfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:22 +0000 (17:53 -0700)]
ocfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agojffs2: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:21 +0000 (17:53 -0700)]
jffs2: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoxfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:20 +0000 (17:53 -0700)]
xfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoreiserfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:19 +0000 (17:53 -0700)]
reiserfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext4: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:18 +0000 (17:53 -0700)]
ext4: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext3: constify xattr handlers
Stephen Hemminger [Fri, 14 May 2010 00:53:17 +0000 (17:53 -0700)]
ext3: constify xattr handlers

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoext2: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:16 +0000 (17:53 -0700)]
ext2: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agobtrfs: constify xattr_handler
Stephen Hemminger [Fri, 14 May 2010 00:53:15 +0000 (17:53 -0700)]
btrfs: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: xattr_handler table should be const
Stephen Hemminger [Fri, 14 May 2010 00:53:14 +0000 (17:53 -0700)]
fs: xattr_handler table should be const

The entries in xattr handler table should be immutable (ie const)
like other operation tables.

Later patches convert common filesystems. Uncoverted filesystems
will still work, but will generate a compiler warning.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoIntroduce freeze_super and thaw_super for the fsfreeze ioctl
Josef Bacik [Tue, 23 Mar 2010 14:34:56 +0000 (10:34 -0400)]
Introduce freeze_super and thaw_super for the fsfreeze ioctl

Currently the way we do freezing is by passing sb>s_bdev to freeze_bdev and then
letting it do all the work.  But freezing is more of an fs thing, and doesn't
really have much to do with the bdev at all, all the work gets done with the
super.  In btrfs we do not populate s_bdev, since we can have multiple bdev's
for one fs and setting s_bdev makes removing devices from a pool kind of tricky.
This means that freezing a btrfs filesystem fails, which causes us to corrupt
with things like tux-on-ice which use the fsfreeze mechanism.  So instead of
populating sb->s_bdev with a random bdev in our pool, I've broken the actual fs
freezing stuff into freeze_super and thaw_super.  These just take the
super_block that we're freezing and does the appropriate work.  It's basically
just copy and pasted from freeze_bdev.  I've then converted freeze_bdev over to
use the new super helpers.  I've tested this with ext4 and btrfs and verified
everything continues to work the same as before.

The only new gotcha is multiple calls to the fsfreeze ioctl will return EBUSY if
the fs is already frozen.  I thought this was a better solution than adding a
freeze counter to the super_block, but if everybody hates this idea I'm open to
suggestions.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoTrim includes in fs/super.c
Al Viro [Tue, 23 Mar 2010 17:56:07 +0000 (13:56 -0400)]
Trim includes in fs/super.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoMove grabbing s_umount to callers of grab_super()
Al Viro [Tue, 23 Mar 2010 15:11:05 +0000 (11:11 -0400)]
Move grabbing s_umount to callers of grab_super()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoTake statfs variants to fs/statfs.c
Al Viro [Tue, 23 Mar 2010 14:37:36 +0000 (10:37 -0400)]
Take statfs variants to fs/statfs.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch selinux delayed superblock handling to iterate_supers()
Al Viro [Tue, 23 Mar 2010 10:36:54 +0000 (06:36 -0400)]
switch selinux delayed superblock handling to iterate_supers()

... kill their private list, while we are at it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agonew helper: iterate_supers()
Al Viro [Tue, 23 Mar 2010 10:06:58 +0000 (06:06 -0400)]
new helper: iterate_supers()

... and switch the simple "loop over superblocks and do something"
loops to it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoBury __put_super_and_need_restart()
Al Viro [Tue, 23 Mar 2010 01:13:53 +0000 (21:13 -0400)]
Bury __put_super_and_need_restart()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix prune_dcache()/umount() race
Al Viro [Tue, 23 Mar 2010 00:27:55 +0000 (20:27 -0400)]
fix prune_dcache()/umount() race

... and get rid of the last __put_super_and_need_restart() caller

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoIn get_super() and user_get_super() restarts are unconditional
Al Viro [Tue, 23 Mar 2010 00:23:25 +0000 (20:23 -0400)]
In get_super() and user_get_super() restarts are unconditional

If superblock had been still alive, we would've returned it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix get_active_super()/umount() race
Al Viro [Tue, 23 Mar 2010 00:15:33 +0000 (20:15 -0400)]
fix get_active_super()/umount() race

This one needs restarts...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix do_emergency_remount()/umount() races
Al Viro [Tue, 23 Mar 2010 00:11:53 +0000 (20:11 -0400)]
fix do_emergency_remount()/umount() races

need list_for_each_entry_safe() here.  Original didn't even
have restart logics, so if you race with umount() it blew up.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoConvert simple loops over superblocks to list_for_each_entry_safe
Al Viro [Tue, 23 Mar 2010 00:09:33 +0000 (20:09 -0400)]
Convert simple loops over superblocks to list_for_each_entry_safe

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoget rid of restarts in sync_filesystems()
Al Viro [Mon, 22 Mar 2010 23:56:42 +0000 (19:56 -0400)]
get rid of restarts in sync_filesystems()

At the same time we can kill s_need_restart and local mutex in there.
__put_super() made public for a while; will be gone later.

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