Linux 2.6.32.19
Subsystems (53)
I'm announcing the release of the 2.6.32.19 kernel.
All users of the 2.6.32 kernel series must upgrade.
The updated 2.6.32.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.32.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/arm/Kconfig | 12 arch/arm/include/asm/tlbflush.h | 8 arch/arm/plat-mxc/include/mach/gpio.h | 1 arch/ia64/hp/common/sba_iommu.c | 38 + arch/ia64/kernel/time.c | 4 arch/powerpc/Makefile | 16 arch/powerpc/include/asm/ppc-pci.h | 5 arch/powerpc/kernel/time.c | 5 arch/powerpc/platforms/pseries/eeh.c | 4 arch/powerpc/platforms/pseries/eeh_driver.c | 4 arch/powerpc/platforms/pseries/eeh_event.c | 2 arch/s390/include/asm/cputime.h | 8 arch/s390/kernel/s390_ext.c | 2 arch/s390/kernel/time.c | 3 arch/s390/kernel/vtime.c | 2 arch/x86/include/asm/cmpxchg_32.h | 86 +-- arch/x86/include/asm/cmpxchg_64.h | 88 +-- arch/x86/kernel/apic/io_apic.c | 28 - arch/x86/kernel/cpu/vmware.c | 10 arch/x86/kernel/vsyscall_64.c | 5 arch/x86/mm/fault.c | 4 arch/x86/mm/init_64.c | 19 crypto/testmgr.c | 84 +++ drivers/acpi/processor_perflib.c | 6 drivers/ata/ata_piix.c | 8 drivers/atm/solos-pci.c | 7 drivers/block/loop.c | 2 drivers/bluetooth/btusb.c | 3 drivers/char/nvram.c | 14 drivers/gpu/drm/drm_edid.c | 4 drivers/gpu/drm/i915/dvo_tfp410.c | 2 drivers/ide/ide-cd.c | 14 drivers/md/bitmap.c | 4 drivers/md/bitmap.h | 3 drivers/md/raid1.c | 25 drivers/md/raid10.c | 18 drivers/net/smsc911x.c | 92 +-- drivers/net/xen-netfront.c | 1 drivers/pci/quirks.c | 4 drivers/s390/cio/cio.c | 1 drivers/scsi/aic7xxx/aic79xx_core.c | 53 +- drivers/scsi/ibmvscsi/ibmvfc.c | 8 drivers/scsi/ibmvscsi/ibmvfc.h | 1 drivers/staging/line6/Kconfig | 1 drivers/staging/panel/panel.c | 2 drivers/usb/core/hub.c | 6 drivers/usb/core/quirks.c | 3 drivers/usb/core/urb.c | 50 - drivers/usb/misc/usbtest.c | 6 drivers/usb/mon/mon_bin.c | 2 drivers/usb/serial/cp210x.c | 4 drivers/usb/serial/ftdi_sio.c | 4 drivers/usb/serial/ftdi_sio_ids.h | 10 drivers/usb/serial/option.c | 13 drivers/video/w100fb.c | 4 drivers/xen/events.c | 1 fs/block_dev.c | 10 fs/btrfs/acl.c | 36 - fs/btrfs/btrfs_inode.h | 5 fs/btrfs/ctree.c | 229 +++++--- fs/btrfs/ctree.h | 40 + fs/btrfs/dir-item.c | 19 fs/btrfs/disk-io.c | 40 + fs/btrfs/extent-tree.c | 112 ++-- fs/btrfs/extent_io.c | 3 fs/btrfs/file.c | 729 ++++++++++++---------------- fs/btrfs/inode.c | 624 ++++++++++++++--------- fs/btrfs/ioctl.c | 34 - fs/btrfs/ordered-data.c | 117 +++- fs/btrfs/ordered-data.h | 5 fs/btrfs/relocation.c | 43 + fs/btrfs/super.c | 20 fs/btrfs/transaction.c | 44 - fs/btrfs/transaction.h | 6 fs/btrfs/tree-log.c | 86 +-- fs/btrfs/volumes.c | 19 fs/btrfs/xattr.c | 80 ++- fs/btrfs/xattr.h | 9 fs/dlm/ast.c | 74 ++ fs/dlm/ast.h | 4 fs/dlm/config.c | 24 fs/dlm/debug_fs.c | 2 fs/dlm/dir.c | 7 fs/dlm/dlm_internal.h | 11 fs/dlm/lock.c | 120 +++- fs/dlm/lockspace.c | 15 fs/dlm/lowcomms.c | 6 fs/dlm/member.c | 8 fs/dlm/memory.c | 6 fs/dlm/netlink.c | 2 fs/dlm/plock.c | 6 fs/dlm/rcom.c | 2 fs/dlm/requestqueue.c | 2 fs/dlm/user.c | 22 fs/dlm/user.h | 4 fs/ecryptfs/file.c | 60 +- fs/ecryptfs/inode.c | 5 fs/ext4/move_extent.c | 3 fs/ext4/super.c | 27 - fs/jfs/xattr.c | 87 +-- fs/ocfs2/alloc.c | 10 fs/ocfs2/alloc.h | 5 fs/ocfs2/locks.c | 2 fs/ocfs2/refcounttree.c | 117 ++++ fs/ocfs2/super.c | 4 fs/proc/array.c | 5 fs/reiserfs/journal.c | 15 fs/reiserfs/xattr_security.c | 2 fs/signalfd.c | 2 fs/splice.c | 12 include/linux/clocksource.h | 6 include/linux/fs.h | 6 include/linux/interrupt.h | 7 include/linux/netdevice.h | 2 include/linux/notifier.h | 1 include/linux/reiserfs_xattr.h | 5 include/linux/sched.h | 4 include/linux/tick.h | 3 include/linux/usb/quirks.h | 4 kernel/exit.c | 20 kernel/fork.c | 3 kernel/irq/manage.c | 2 kernel/sched.c | 71 ++ kernel/sys.c | 18 kernel/time/tick-sched.c | 75 +- kernel/time/timekeeping.c | 6 mm/memory-failure.c | 21 mm/memory.c | 25 mm/swapfile.c | 6 net/ipv4/devinet.c | 1 net/sched/sch_generic.c | 18 132 files changed, 2549 insertions(+), 1552 deletions(-)
Adam Jackson (1):
drm/edid: Fix the HDTV hack sync adjustment
Alessio Igor Bogani (1):
USB: cp210x: Add four new device IDs
Alok Kataria (1):
x86, vmware: Preset lpj values when on VMware.
Andrew Bird (1):
USB: option: add huawei k3765 k4505 devices to work properly
Aneesh Kumar K.V (2):
Btrfs: Use correct values when updating inode i_size on fallocate
Btrfs: apply updated fallocate i_size fix
Benjamin Herrenschmidt (1):
mutex: Don't spin when the owner CPU is offline or other weird cases
Borislav Petkov (1):
ide-cd: Do not access completed requests in the irq handler
Breno Leitao (1):
powerpc/eeh: Fix a bug when pci structure is null
Brian King (2):
ibmvfc: Fix command completion handling
ibmvfc: Reduce error recovery timeout
Catalin Marinas (1):
smsc911x: Add spinlocks around registers access
Chris Mason (2):
Btrfs: make sure fallocate properly starts a transaction
Btrfs: deal with NULL acl sent to btrfs_set_acl
Chris Wright (1):
blkdev: cgroup whitelist permission fix
Christian Lamparter (1):
USB: fix thread-unsafe anchor utiliy routines
Cyril Lacoux (1):
Bluetooth: Added support for controller shipped with iMac i5
Darrick J. Wong (1):
ACPI: Fix regression where _PPC is not read at boot even when ignore_ppc=0
Dave Kleikamp (1):
jfs: don't allow os2 xattr namespace overlap with others
Dave Müller (1):
drm/i915: Use RSEN instead of HTPLG for tfp410 monitor detection.
David S. Miller (1):
net: Fix NETDEV_NOTIFY_PEERS to not conflict with NETDEV_BONDING_DESLAVE.
David Teigland (3):
dlm: always use GFP_NOFS
dlm: fix ordering of bast and cast
dlm: send reply before bast
David Woodhouse (1):
solos-pci: Fix race condition in tasklet RX handling
Eric Sandeen (2):
ext4: fix freeze deadlock under IO
ext4: Fix optional-arg mount options
Eric W. Biederman (1):
x86: Fix out of order of gsi
FUJITA Tomonori (1):
fix SBA IOMMU to handle allocation failure properly
Greg Kroah-Hartman (1):
Linux 2.6.32.19
H. Peter Anvin (2):
nvram: Fix write beyond end condition; prove to gcc copy is safe
x86: Add memory modify constraints to xchg() and cmpxchg()
Hannes Reinecke (1):
aic79xx: check for non-NULL scb in ahd_handle_nonpkt_busfree
Hidetoshi Seto (2):
sched: Fix granularity of task_u/stime() sched, cputime: Introduce thread_group_times()
Ian Campbell (4):
arp_notify: allow drivers to explicitly request a notification event.
xen: netfront: explicitly generate arp_notify event after migration.
irq: Add new IRQ flag IRQF_NO_SUSPEND
xen: Do not suspend IPI IRQs.
Jan Engelhardt (1):
btrfs: fix missing last-entry in readdir(3)
Jan Kara (1):
ocfs2: Set MS_POSIXACL on remount
Jeff Mahoney (2):
reiserfs: properly honor read-only devices
reiserfs: fix oops while creating privroot with selinux enabled
Jiri Slaby (1):
Btrfs, fix memory leaks in error paths
John G. Rogers (1):
USB: serial: enabling support for Segway RMP in ftdi_sio
Josef Bacik (9):
Btrfs: make metadata chunks smaller
Btrfs: fix regression in orphan cleanup
Btrfs: fix possible panic on unmount
Btrfs: run orphan cleanup on default fs root
Btrfs: do not mark the chunk as readonly if in degraded mode
Btrfs: check return value of open_bdev_exclusive properly
Btrfs: check total number of devices when removing missing
Btrfs: do not try and lookup the file extent when finishing ordered io
Btrfs: kfree correct pointer during mount option parsing
Julia Lawall (1):
fs/ecryptfs/file.c: introduce missing free
KAMEZAWA Hiroyuki (1):
mm: fix corruption of hibernation caused by reusing swap during image saving
Lin Ming (1):
timekeeping: Fix clock_gettime vsyscall time warp
Lino Sanfilippo (1):
ecryptfs: release reference to lower mount if interpose fails
Linus Torvalds (3):
mm: keep a guard page below a grow-down stack segment
mm: fix missing page table unmap for stack guard page failure case
x86: don't send SIGBUS for kernel page faults
Martin Schwidefsky (2):
nohz: Introduce arch_needs_cpu
nohz: Reuse ktime in sub-functions of tick_check_idle.
Matthew Wilcox (1):
Btrfs: Show discard option in /proc/mounts
Miao Xie (1):
Btrfs: remove BUG_ON() due to mounting bad filesystem
Miklos Szeredi (1):
splice: fix misuse of SPLICE_F_NONBLOCK
Ming Lei (1):
USB: usbtest: avoid to free coherent buffer in atomic context
Nathan Lynch (1):
signalfd: fill in ssi_int for posix timers and message queues
NeilBrown (2):
md/raid10: fix deadlock with unaligned read during resync md/raid1: delay reads that could overtake behind-writes.
Nikanth Karthikesan (1):
loop: Update mtime when writing using aops
Pavel Kazlou (1):
USB: option: Huawei ETS 1220 support added
Peter Huewe (2):
Staging: panel: Prevent double-calling of parport_release - fix oops. drivers/video/w100fb.c: ignore void return value / fix build failure
Phil Dibowitz (1):
USB delay init quirk for logitech Harmony 700-series devices
Rafael J. Wysocki (1):
PCI: Do not run NVidia quirks related to MSI with MSI disabled
Randy Dunlap (1):
Staging: line6: needs to select SND_PCM
Roel Kluin (1):
Btrfs: make error return negative in btrfs_sync_file()
Sachin Prabhu (1):
Skip check for mandatory locks when unlocking
Sage Weil (1):
Btrfs: fail mount on bad mount options
Sam Ravnborg (1):
powerpc: fix build with make 3.82
Shaohua Li (1):
Btrfs: btrfs_mark_extent_written uses the wrong slot
Shaohui Zheng (1):
memory hotplug: fix a bug on /dev/mem for 64-bit kernels
Song Youquan (1):
crypto: testmgr - Fix complain about lack test for internal used algorithm
Steven Robertson (1):
USB: resizing usbmon binary interface buffer causes protection faults
TARUISI Hiroaki (1):
Btrfs: deny sys_link across subvolumes.
Tao Ma (1):
ocfs2: Find proper end cpos for a leaf refcount block.
Tejun Heo (3):
ata_piix: fix locking around SIDPR access
PCI: disable MSI on VIA K8M800
bio, fs: update RWA_MASK, READA and SWRITE to match the corresponding BIO_RW_* bits
Theodore Ts'o (1):
ext4: Make sure the MOVE_EXT ioctl can't overwrite append-only files
Tyler Hicks (1):
eCryptfs: Handle ioctl calls with unlocked and compat functions
Uwe Kleine-König (1):
ARM: 6280/1: imx: Fix build failure when including <mach/gpio.h> without <linux/spinlock.h>
Will Deacon (1):
ARM: 6299/1: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID
Wu Fengguang (2):
HWPOISON: remove the anonymous entry
HWPOISON: abort on failed unmap
Yan, Zheng (17):
Btrfs: Avoid superfluous tree-log writeout
Btrfs: Add btrfs_duplicate_item
Btrfs: Rewrite btrfs_drop_extents
Btrfs: Fix disk_i_size update corner case
Btrfs: Avoid orphan inodes cleanup while replaying log
Btrfs: Avoid orphan inodes cleanup during committing transaction
Btrfs: Make fallocate(2) more ENOSPC friendly
Btrfs: Make truncate(2) more ENOSPC friendly
Btrfs: Pass transaction handle to security and ACL initialization functions
Btrfs: Add delayed iput
Btrfs: Fix btrfs_drop_extent_cache for skip pinned case
Btrfs: Fix per root used space accounting
Btrfs: don't add extent 0 to the free space cache v2
Btrfs: align offsets for btrfs_ordered_update_i_size
Btrfs: Fix race in btrfs_mark_extent_written
Btrfs: fix race between allocate and release extent buffer.
Btrfs: Fix oopsen when dropping empty tree.
Yang Hongyang (1):
Btrfs: fix a memory leak in btrfs_init_acl
[email protected] (1):
USB: ftdi_sio: device id for Navitator
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 32 -EXTRAVERSION = .18 +EXTRAVERSION = .19 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/arm/Kconfig +12 -0
@@ -887,6 +887,18 @@ config ARM_ERRATA_460075 ACTLR register. Note that setting specific bits in the ACTLR register may not be available in non-secure mode. +config ARM_ERRATA_720789 + bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" + depends on CPU_V7 && SMP + help + This option enables the workaround for the 720789 Cortex-A9 (prior to + r2p0) erratum. A faulty ASID can be sent to the other CPUs for the + broadcasted CP15 TLB maintenance operations TLBIASIDIS and TLBIMVAIS. + As a consequence of this erratum, some TLB entries which should be + invalidated are not, resulting in an incoherency in the system page + tables. The workaround changes the TLB flushing routines to invalidate + entries regardless of the ASID. + endmenu source "arch/arm/common/Kconfig"
arch/arm/include/asm/tlbflush.h +8 -0
@@ -369,7 +369,11 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm)if (tlb_flag (TLB_V6_I_ASID )) asm("mcr p15, 0, %0, c8, c5, 2" : :"r" (asid) :"cc" ); if (tlb_flag(TLB_V7_UIS_ASID)) +#ifdef CONFIG_ARM_ERRATA_720789 + asm("mcr p15, 0, %0, c8, c3, 0" : :"r" (zero) :"cc" ); +#else asm("mcr p15, 0, %0, c8, c3, 2" : :"r" (asid) :"cc" ); +#endif if (tlb_flag (TLB_BTB )) {/* flush the branch target cache */
@@ -409,7 +413,11 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)if (tlb_flag (TLB_V6_I_PAGE )) asm("mcr p15, 0, %0, c8, c5, 1" : :"r" (uaddr) :"cc" ); if (tlb_flag(TLB_V7_UIS_PAGE)) +#ifdef CONFIG_ARM_ERRATA_720789 + asm("mcr p15, 0, %0, c8, c3, 3" : :"r" (uaddr &PAGE_MASK ) :"cc" ); +#else asm("mcr p15, 0, %0, c8, c3, 1" : :"r" (uaddr) :"cc" ); +#endif if (tlb_flag (TLB_BTB )) {/* flush the branch target cache */
arch/arm/plat-mxc/include/mach/gpio.h +1 -0
@@ -19,6 +19,7 @@#ifndef __ASM_ARCH_MXC_GPIO_H__#define __ASM_ARCH_MXC_GPIO_H__ +#include <linux/spinlock.h> #include <mach/hardware.h> #include <asm-generic/gpio.h>
arch/ia64/hp/common/sba_iommu.c +29 -9
@@ -677,12 +677,19 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size)spin_unlock_irqrestore (&ioc->saved_lock, flags); pide =sba_search_bitmap (ioc, dev, pages_needed,0 ); -if (unlikely (pide >= (ioc->res_size <<3 ))) -panic (__FILE__": I/O MMU @ %p is out of mapping resources\n" , - ioc->ioc_hpa); +if (unlikely (pide >= (ioc->res_size <<3 ))) { +printk (KERN_WARNING "%s: I/O MMU @ %p is" +"out of mapping resources, %u %u %lx\n" , + __func__, ioc->ioc_hpa, ioc->res_size, + pages_needed,dma_get_seg_boundary (dev)); +return -1 ; + }#else -panic (__FILE__": I/O MMU @ %p is out of mapping resources\n" , - ioc->ioc_hpa); +printk (KERN_WARNING "%s: I/O MMU @ %p is" +"out of mapping resources, %u %u %lx\n" , + __func__, ioc->ioc_hpa, ioc->res_size, + pages_needed,dma_get_seg_boundary (dev)); +return -1 ;#endif } }
@@ -965,6 +972,8 @@ static dma_addr_t sba_map_page(struct device *dev, struct page *page,#endif pide =sba_alloc_range (ioc, dev, size); +if (pide <0 ) +return 0 ; iovp = (dma_addr_t ) pide << iovp_shift;
@@ -1320,6 +1329,7 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev,unsigned long dma_offset, dma_len;/* start/len of DMA stream */ int n_mappings =0 ;unsigned int max_seg_size =dma_get_max_seg_size (dev); +int idx;while (nents >0 ) {unsigned long vaddr = (unsigned long )sba_sg_address (startsg);
@@ -1418,16 +1428,22 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev, vcontig_sg->dma_length = vcontig_len; dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask;ASSERT (dma_len <=DMA_CHUNK_SIZE ); - dma_sg->dma_address = (dma_addr_t) (PIDE_FLAG - | (sba_alloc_range (ioc, dev, dma_len) << iovp_shift) - | dma_offset); + idx =sba_alloc_range (ioc, dev, dma_len); +if (idx <0 ) { + dma_sg->dma_length =0 ; +return -1 ; + } + dma_sg->dma_address = (dma_addr_t)(PIDE_FLAG | (idx << iovp_shift) + | dma_offset); n_mappings++; }return n_mappings; } - +static void sba_unmap_sg_attrs (struct device *dev,struct scatterlist *sglist, +int nents,enum dma_data_direction dir, +struct dma_attrs *attrs);/** * sba_map_sg - map Scatter/Gather list * @dev: instance of PCI owned by the driver that's asking.
@@ -1493,6 +1509,10 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,** Access to the virtual address is what forces a two pass algorithm. */ coalesced =sba_coalesce_chunks (ioc, dev, sglist, nents); +if (coalesced <0 ) { +sba_unmap_sg_attrs (dev, sglist, nents, dir, attrs); +return 0 ; + }/* ** Program the I/O Pdir
arch/ia64/kernel/time.c +2 -2
@@ -473,7 +473,7 @@ void update_vsyscall_tz(void) { } -void update_vsyscall (struct timespec *wall,struct clocksource *c) +void update_vsyscall (struct timespec *wall,struct clocksource *c,u32 mult) {unsigned long flags;
@@ -481,7 +481,7 @@ void update_vsyscall(struct timespec *wall, struct clocksource *c)/* copy fsyscall clock data */ fsyscall_gtod_data.clk_mask = c->mask; - fsyscall_gtod_data.clk_mult = c->mult; + fsyscall_gtod_data.clk_mult = mult; fsyscall_gtod_data.clk_shift = c->shift; fsyscall_gtod_data.clk_fsys_mmio = c->fsys_mmio; fsyscall_gtod_data.clk_cycle_last = c->cycle_last;
arch/powerpc/Makefile +12 -4
@@ -158,9 +158,11 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ # Default to zImage, override when needed all: zImage -BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% +# With make 3.82 we cannot mix normal and wildcard targets +BOOT_TARGETS1 := zImage zImage.initrd uImaged +BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.% -PHONY += $(BOOT_TARGETS) +PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2) boot := arch/$(ARCH)/boot
@@ -175,10 +177,16 @@ relocs_check: arch/powerpc/relocs_check.pl vmlinux zImage: relocs_check endif -$(BOOT_TARGETS): vmlinux +$(BOOT_TARGETS1): vmlinux + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) +$(BOOT_TARGETS2): vmlinux + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) + + +bootwrapper_install: $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) -bootwrapper_install %.dtb: +%.dtb: $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) define archhelp
arch/powerpc/include/asm/ppc-pci.h +5 -0
@@ -137,6 +137,11 @@ struct device_node * find_device_pe(struct device_node *dn);void eeh_sysfs_add_device (struct pci_dev *pdev);void eeh_sysfs_remove_device (struct pci_dev *pdev); +static inline const char *eeh_pci_name (struct pci_dev *pdev) +{ +return pdev ?pci_name (pdev) :"<null>" ; +} +#endif /* CONFIG_EEH */ #else /* CONFIG_PCI */
arch/powerpc/kernel/time.c +3 -2
@@ -864,7 +864,8 @@ static cycle_t timebase_read(struct clocksource *cs)return (cycle_t )get_tb (); } -void update_vsyscall (struct timespec *wall_time,struct clocksource *clock) +void update_vsyscall (struct timespec *wall_time,struct clocksource *clock, +u32 mult) {u64 t2x, stamp_xsec;
@@ -877,7 +878,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock)/* XXX this assumes clock->shift == 22 */ /* 4611686018 ~= 2^(20+64-22) / 1e9 */ - t2x = (u64 ) clock->mult *4611686018ULL ; + t2x = (u64 ) mult *4611686018ULL ; stamp_xsec = (u64 ) xtime.tv_nsec *XSEC_PER_SEC ;do_div (stamp_xsec,1000000000 ); stamp_xsec += (u64 ) xtime.tv_sec *XSEC_PER_SEC ;
arch/powerpc/platforms/pseries/eeh.c +2 -2
@@ -491,7 +491,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) pdn->eeh_mode & EEH_MODE_NOCHECK) { ignored_check++;pr_debug ("EEH: Ignored check (%x) for %s %s\n" , - pdn->eeh_mode,pci_name (dev), dn->full_name); + pdn->eeh_mode,eeh_pci_name (dev), dn->full_name);return 0 ; }
@@ -515,7 +515,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)printk (KERN_ERR "EEH: %d reads ignored for recovering device at " "location=%s driver=%s pci addr=%s\n" , pdn->eeh_check_count, location, - dev->driver->name,pci_name (dev)); + dev->driver->name,eeh_pci_name (dev));printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n" , dev->driver->name);dump_stack ();
arch/powerpc/platforms/pseries/eeh_driver.c +2 -2
@@ -353,7 +353,7 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) location = location ? location :"unknown" ;printk (KERN_ERR "EEH: Error: Cannot find partition endpoint " "for location=%s pci addr=%s\n" , - location,pci_name (event->dev)); + location,eeh_pci_name (event->dev));return NULL ; }
@@ -384,7 +384,7 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) pci_str =pci_name (frozen_pdn->pcidev); drv_str =pcid_name (frozen_pdn->pcidev); }else { - pci_str =pci_name (event->dev); + pci_str =eeh_pci_name (event->dev); drv_str =pcid_name (event->dev); }
arch/powerpc/platforms/pseries/eeh_event.c +1 -1
@@ -80,7 +80,7 @@ static int eeh_event_handler(void * dummy)eeh_mark_slot (event->dn,EEH_MODE_RECOVERING );printk (KERN_INFO "EEH: Detected PCI bus error on device %s\n" , -pci_name (event->dev)); +eeh_pci_name (event->dev)); pdn =handle_eeh_events (event);
arch/s390/include/asm/cputime.h +8 -0
@@ -183,6 +183,7 @@ struct s390_idle_data {unsigned long long idle_count;unsigned long long idle_enter;unsigned long long idle_time; +int nohz_delay; }; DECLARE_PER_CPU(struct s390_idle_data, s390_idle);
@@ -198,4 +199,11 @@ static inline void s390_idle_check(void) vtime_start_cpu(); } +static inline int s390_nohz_delay (int cpu) +{ +return per_cpu (s390_idle, cpu).nohz_delay !=0 ; +} + +#define arch_needs_cpu (cpu) s390_nohz_delay(cpu) +#endif /* _S390_CPUTIME_H */
arch/s390/kernel/s390_ext.c +2 -0
@@ -126,6 +126,8 @@ void __irq_entry do_extint(struct pt_regs *regs, unsigned short code)/* Serve timer interrupts first. */ clock_comparator_work ();kstat_cpu (smp_processor_id ()).irqs[EXTERNAL_INTERRUPT ]++; +if (code !=0x1004 ) +__get_cpu_var (s390_idle).nohz_delay =1 ; index =ext_hash (code);for (p = ext_int_hash[index]; p; p = p->next) {if (likely (p->code == code))
arch/s390/kernel/time.c +2 -1
@@ -214,7 +214,8 @@ struct clocksource * __init clocksource_default_clock(void)return &clocksource_tod; } -void update_vsyscall (struct timespec *wall_time,struct clocksource *clock) +void update_vsyscall (struct timespec *wall_time,struct clocksource *clock, +u32 mult) {if (clock != &clocksource_tod)return ;
arch/s390/kernel/vtime.c +2 -0
@@ -167,6 +167,8 @@ void vtime_stop_cpu(void)/* Wait for external, I/O or machine check interrupt. */ psw.mask = psw_kernel_bits |PSW_MASK_WAIT |PSW_MASK_IO |PSW_MASK_EXT ; + idle->nohz_delay =0 ; +/* Check if the CPU timer needs to be reprogrammed. */ if (vq->do_spt) {__u64 vmax =VTIMER_MAX_SLICE ;
arch/x86/include/asm/cmpxchg_32.h +42 -44
159 lines not on this page · raw message
arch/x86/include/asm/cmpxchg_64.h +47 -41
148 lines not on this page · raw message
arch/x86/kernel/apic/io_apic.c +10 -18
@@ -1484,7 +1484,7 @@ static struct {static void __init setup_IO_APIC_irqs (void ) { -int apic_id =0 , pin, idx, irq; +int apic_id, pin, idx, irq;int notcon =0 ;struct irq_desc *desc;struct irq_cfg *cfg;
@@ -1492,14 +1492,7 @@ static void __init setup_IO_APIC_irqs(void)apic_printk (APIC_VERBOSE ,KERN_DEBUG "init IO_APIC IRQs\n" ); -#ifdef CONFIG_ACPI -if (!acpi_disabled && acpi_ioapic) { - apic_id =mp_find_ioapic (0 ); -if (apic_id <0 ) - apic_id =0 ; - } -#endif - +for (apic_id =0 ; apic_id < nr_ioapics; apic_id++)for (pin =0 ; pin < nr_ioapic_registers[apic_id]; pin++) { idx =find_irq_entry (apic_id, pin, mp_INT);if (idx ==-1 ) {
@@ -1521,6 +1514,9 @@ static void __init setup_IO_APIC_irqs(void) irq =pin_2_irq (idx, apic_id, pin); +if ((apic_id >0 ) && (irq >16 )) +continue ; +/* * Skip the timer IRQ if there's a quirk handler * installed and if it returns 1:
@@ -4083,27 +4079,23 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)#ifdef CONFIG_SMP void __init setup_ioapic_dest (void ) { -int pin, ioapic =0 , irq, irq_entry; +int pin, ioapic, irq, irq_entry;struct irq_desc *desc;const struct cpumask *mask;if (skip_ioapic_setup ==1 )return ; -#ifdef CONFIG_ACPI -if (!acpi_disabled && acpi_ioapic) { - ioapic =mp_find_ioapic (0 ); -if (ioapic <0 ) - ioapic =0 ; - } -#endif - +for (ioapic =0 ; ioapic < nr_ioapics; ioapic++)for (pin =0 ; pin < nr_ioapic_registers[ioapic]; pin++) { irq_entry =find_irq_entry (ioapic, pin, mp_INT);if (irq_entry ==-1 )continue ; irq =pin_2_irq (irq_entry, ioapic, pin); +if ((ioapic >0 ) && (irq >16 )) +continue ; + desc =irq_to_desc (irq);/*
arch/x86/kernel/cpu/vmware.c +9 -1
@@ -22,6 +22,7 @@*/ #include <linux/dmi.h> +#include <linux/jiffies.h> #include <asm/div64.h> #include <asm/vmware.h> #include <asm/x86_init.h>
@@ -50,7 +51,7 @@ static inline int __vmware_platform(void)static unsigned long vmware_get_tsc_khz (void ) { -uint64_t tsc_hz; +uint64_t tsc_hz, lpj;uint32_t eax, ebx, ecx, edx;VMWARE_PORT (GETHZ , eax, ebx, ecx, edx);
@@ -61,6 +62,13 @@ static unsigned long vmware_get_tsc_khz(void)printk (KERN_INFO "TSC freq read from hypervisor : %lu.%03lu MHz\n" , (unsigned long ) tsc_hz /1000 , (unsigned long ) tsc_hz %1000 ); + +if (!preset_lpj) { + lpj = ((u64 )tsc_hz *1000 ); +do_div (lpj,HZ ); + preset_lpj = lpj; + } +return tsc_hz; }
arch/x86/kernel/vsyscall_64.c +3 -2
@@ -73,7 +73,8 @@ void update_vsyscall_tz(void)write_sequnlock_irqrestore (&vsyscall_gtod_data.lock, flags); } -void update_vsyscall (struct timespec *wall_time,struct clocksource *clock) +void update_vsyscall (struct timespec *wall_time,struct clocksource *clock, +u32 mult) {unsigned long flags;
@@ -82,7 +83,7 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock) vsyscall_gtod_data.clock.vread = clock->vread; vsyscall_gtod_data.clock.cycle_last = clock->cycle_last; vsyscall_gtod_data.clock.mask = clock->mask; - vsyscall_gtod_data.clock.mult = clock->mult; + vsyscall_gtod_data.clock.mult = mult; vsyscall_gtod_data.clock.shift = clock->shift; vsyscall_gtod_data.wall_time_sec = wall_time->tv_sec; vsyscall_gtod_data.wall_time_nsec = wall_time->tv_nsec;
arch/x86/mm/fault.c +3 -1
@@ -801,8 +801,10 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address,up_read (&mm->mmap_sem);/* Kernel mode? Handle exceptions or die: */ -if (!(error_code &PF_USER )) +if (!(error_code &PF_USER )) {no_context (regs, error_code, address); +return ; + }/* User-space => ok to do another page fault: */ if (is_prefetch (regs, error_code, address))
arch/x86/mm/init_64.c +19 -0
@@ -49,6 +49,7 @@#include <asm/numa.h> #include <asm/cacheflush.h> #include <asm/init.h> +#include <linux/bootmem.h> static unsigned long dma_reserve__initdata ;
@@ -615,6 +616,21 @@ void __init paging_init(void)*/ #ifdef CONFIG_MEMORY_HOTPLUG /* +* After memory hotplug the variables max_pfn, max_low_pfn and high_memory need +* updating. +*/ +static void update_end_of_memory_vars (u64 start,u64 size) +{ +unsigned long end_pfn =PFN_UP (start + size); + +if (end_pfn > max_pfn) { + max_pfn = end_pfn; + max_low_pfn = end_pfn; + high_memory = (void *)__va (max_pfn *PAGE_SIZE -1 ) +1 ; + } +} + +/* * Memory is added always to NORMAL zone. This means you will never get * additional DMA/DMA32 memory. */
@@ -633,6 +649,9 @@ int arch_add_memory(int nid, u64 start, u64 size) ret =__add_pages (nid, zone, start_pfn, nr_pages);WARN_ON_ONCE (ret); +/* update max_pfn, max_low_pfn and high_memory */ +update_end_of_memory_vars (start, size); +return ret; }EXPORT_SYMBOL_GPL (arch_add_memory);
crypto/testmgr.c +84 -0
105 lines not on this page · raw message
drivers/acpi/processor_perflib.c +5 -1
@@ -356,7 +356,11 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)if (result) goto update_bios; -return 0 ; +/* We need to call _PPC once when cpufreq starts */ +if (ignore_ppc !=1 ) + result =acpi_processor_get_platform_limit (pr); + +return result;/* * Having _PPC but missing frequencies (_PSS, _PCT) is a very good hint that
drivers/ata/ata_piix.c +8 -0
@@ -157,6 +157,7 @@ struct piix_map_db {struct piix_host_priv {const int *map;u32 saved_iocfg; +spinlock_t sidpr_lock;/* FIXME: remove once locking in EH is fixed */ void __iomem *sidpr; };
@@ -948,12 +949,15 @@ static int piix_sidpr_scr_read(struct ata_link *link, unsigned int reg, u32 *val) { struct piix_host_priv *hpriv = link->ap->host->private_data; +unsigned long flags;if (reg >=ARRAY_SIZE (piix_sidx_map))return -EINVAL ; +spin_lock_irqsave (&hpriv->sidpr_lock, flags);piix_sidpr_sel (link, reg); *val =ioread32 (hpriv->sidpr +PIIX_SIDPR_DATA ); +spin_unlock_irqrestore (&hpriv->sidpr_lock, flags);return 0 ; }
@@ -961,12 +965,15 @@ static int piix_sidpr_scr_write(struct ata_link *link, unsigned int reg, u32 val) {struct piix_host_priv *hpriv = link->ap->host->private_data; +unsigned long flags;if (reg >=ARRAY_SIZE (piix_sidx_map))return -EINVAL ; +spin_lock_irqsave (&hpriv->sidpr_lock, flags);piix_sidpr_sel (link, reg);iowrite32 (val, hpriv->sidpr +PIIX_SIDPR_DATA ); +spin_unlock_irqrestore (&hpriv->sidpr_lock, flags);return 0 ; }
@@ -1555,6 +1562,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev, hpriv =devm_kzalloc (dev,sizeof (*hpriv),GFP_KERNEL );if (!hpriv)return -ENOMEM ; +spin_lock_init (&hpriv->sidpr_lock);/* Save IOCFG, this will be used for cable detection, quirk * detection and restoration on detach. This is necessary
drivers/atm/solos-pci.c +6 -1
@@ -774,7 +774,8 @@ static struct atm_vcc *find_vcc(struct atm_dev *dev, short vpi, int vci)sk_for_each (s, node, head) { vcc =atm_sk (s);if (vcc->dev == dev && vcc->vci == vci && - vcc->vpi == vpi && vcc->qos.rxtp.traffic_class !=ATM_NONE ) + vcc->vpi == vpi && vcc->qos.rxtp.traffic_class !=ATM_NONE && +test_bit (ATM_VF_READY , &vcc->flags)) goto out; } vcc =NULL ;
@@ -900,6 +901,10 @@ static void pclose(struct atm_vcc *vcc)clear_bit (ATM_VF_ADDR , &vcc->flags);clear_bit (ATM_VF_READY , &vcc->flags); +/* Hold up vcc_destroy_socket() (our caller) until solos_bh() in the +tasklet has finished processing any incoming packets (and, more to +the point, using the vcc pointer). */ +tasklet_unlock_wait (&card->tlet);return ; }
drivers/block/loop.c +2 -0
@@ -238,6 +238,8 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,if (ret) goto fail; +file_update_time (file); + transfer_result =lo_do_transfer (lo,WRITE , page, offset, bvec->bv_page, bv_offs, size,IV ); copied = size;
drivers/bluetooth/btusb.c +3 -0
@@ -59,6 +59,9 @@ static struct usb_device_id btusb_table[] = {/* Generic Bluetooth USB device */ { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, +/* Apple iMac11,1 */ + { USB_DEVICE(0x05ac, 0x8215) }, +/* AVM BlueFRITZ! USB v2.0 */ { USB_DEVICE(0x057c, 0x3800) },
drivers/char/nvram.c +10 -4
@@ -265,10 +265,16 @@ static ssize_t nvram_write(struct file *file, const char __user *buf,unsigned char contents[NVRAM_BYTES ];unsigned i = *ppos;unsigned char *tmp; -int len; - len = (NVRAM_BYTES - i) < count ? (NVRAM_BYTES - i) : count; -if (copy_from_user (contents, buf, len)) +if (i >=NVRAM_BYTES ) +return 0 ;/* Past EOF */ + +if (count >NVRAM_BYTES - i) + count =NVRAM_BYTES - i; +if (count >NVRAM_BYTES ) +return -EFAULT ;/* Can't happen, but prove it to gcc */ + +if (copy_from_user (contents, buf, count))return -EFAULT ;spin_lock_irq (&rtc_lock);
@@ -276,7 +282,7 @@ static ssize_t nvram_write(struct file *file, const char __user *buf,if (!__nvram_check_checksum ()) goto checksum_err; -for (tmp = contents; count-- >0 && i <NVRAM_BYTES ; ++i, ++tmp) +for (tmp = contents; count--; ++i, ++tmp)__nvram_write_byte (*tmp, i);__nvram_set_checksum ();
drivers/gpu/drm/drm_edid.c +2 -2
@@ -565,8 +565,8 @@ struct drm_display_mode *drm_mode_std(struct drm_device *dev, mode =drm_cvt_mode (dev, hsize, vsize, vrefresh_rate,0 ,0 , false); mode->hdisplay =1366 ; - mode->vsync_start = mode->vsync_start -1 ; - mode->vsync_end = mode->vsync_end -1 ; + mode->hsync_start = mode->hsync_start -1 ; + mode->hsync_end = mode->hsync_end -1 ;return mode; } mode =NULL ;
drivers/gpu/drm/i915/dvo_tfp410.c +1 -1
@@ -214,7 +214,7 @@ static enum drm_connector_status tfp410_detect(struct intel_dvo_device *dvo)uint8_t ctl2;if (tfp410_readb (dvo,TFP410_CTL_2 , &ctl2)) { -if (ctl2 &TFP410_CTL_2_HTPLG ) +if (ctl2 &TFP410_CTL_2_RSEN ) ret = connector_status_connected;else ret = connector_status_disconnected;
drivers/ide/ide-cd.c +11 -3
@@ -506,15 +506,22 @@ int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,return (flags &REQ_FAILED ) ? -EIO :0 ; } -static void ide_cd_error_cmd (ide_drive_t *drive,struct ide_cmd *cmd) +/* +* returns true if rq has been completed +*/ +static bool ide_cd_error_cmd (ide_drive_t *drive,struct ide_cmd *cmd) {unsigned int nr_bytes = cmd->nbytes - cmd->nleft;if (cmd->tf_flags &IDE_TFLAG_WRITE ) nr_bytes -= cmd->last_xfer_len; -if (nr_bytes >0 ) +if (nr_bytes >0 ) {ide_complete_rq (drive,0 , nr_bytes); +return true; + } + +return false; }static ide_startstop_t cdrom_newpc_intr (ide_drive_t *drive)
@@ -679,7 +686,8 @@ out_end: }if (uptodate ==0 && rq->bio) -ide_cd_error_cmd (drive, cmd); +if (ide_cd_error_cmd (drive, cmd)) +return ide_stopped;/* make sure it's fully ended */ if (blk_fs_request (rq) ==0 ) {
drivers/md/bitmap.c +3 -1
@@ -1317,7 +1317,8 @@ void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long secto {if (!bitmap)return ;if (behind) { -atomic_dec (&bitmap->behind_writes); +if (atomic_dec_and_test (&bitmap->behind_writes)) +wake_up (&bitmap->behind_wait);PRINTK (KERN_DEBUG "dec write-behind count %d/%d\n" ,atomic_read (&bitmap->behind_writes), bitmap->max_write_behind); }
@@ -1629,6 +1630,7 @@ int bitmap_create(mddev_t *mddev)atomic_set (&bitmap->pending_writes,0 );init_waitqueue_head (&bitmap->write_wait);init_waitqueue_head (&bitmap->overflow_wait); +init_waitqueue_head (&bitmap->behind_wait); bitmap->mddev = mddev;
drivers/md/bitmap.h +3 -0
@@ -254,6 +254,9 @@ struct bitmap {wait_queue_head_t write_wait;wait_queue_head_t overflow_wait; +#ifndef __GENKSYMS__ +wait_queue_head_t behind_wait; +#endif };/* the bitmap API */
drivers/md/raid1.c +18 -7
@@ -845,6 +845,15 @@ static int make_request(struct request_queue *q, struct bio * bio) } mirror = conf->mirrors + rdisk; +if (test_bit (WriteMostly, &mirror->rdev->flags) && + bitmap) { +/* Reading from a write-mostly device must +* take care not to over-take any writes +* that are 'behind' +*/ +wait_event (bitmap->behind_wait, +atomic_read (&bitmap->behind_writes) ==0 ); + } r1_bio->read_disk = rdisk; read_bio =bio_clone (bio,GFP_NOIO );
@@ -922,9 +931,13 @@ static int make_request(struct request_queue *q, struct bio * bio)set_bit (R1BIO_Degraded, &r1_bio->state); } -/* do behind I/O ? */ +/* do behind I/O ? +* Not if there are too many, or cannot allocate memory, +* or a reader on WriteMostly is waiting for behind writes +* to flush */ if (bitmap &&atomic_read (&bitmap->behind_writes) < bitmap->max_write_behind && + !waitqueue_active (&bitmap->behind_wait) && (behind_pages =alloc_behind_pages (bio)) !=NULL )set_bit (R1BIO_BehindIO, &r1_bio->state);
@@ -2105,15 +2118,13 @@ static int stop(mddev_t *mddev) {conf_t *conf = mddev->private;struct bitmap *bitmap = mddev->bitmap; -int behind_wait =0 ;/* wait for behind writes to complete */ -while (bitmap &&atomic_read (&bitmap->behind_writes) >0 ) { - behind_wait++; -printk (KERN_INFO "raid1: behind writes in progress on device %s, waiting to stop (%d)\n" ,mdname (mddev), behind_wait); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ );/* wait a second */ +if (bitmap &&atomic_read (&bitmap->behind_writes) >0 ) { +printk (KERN_INFO "raid1: behind writes in progress on device %s, waiting to stop.\n" ,mdname (mddev));/* need to kick something here to make sure I/O goes? */ +wait_event (bitmap->behind_wait, +atomic_read (&bitmap->behind_writes) ==0 ); }raise_barrier (conf);
drivers/md/raid10.c +18 -0
@@ -824,11 +824,29 @@ static int make_request(struct request_queue *q, struct bio * bio)*/ bp =bio_split (bio, chunk_sects - (bio->bi_sector & (chunk_sects -1 )) ); + +/* Each of these 'make_request' calls will call 'wait_barrier'. +* If the first succeeds but the second blocks due to the resync +* thread raising the barrier, we will deadlock because the +* IO to the underlying device will be queued in generic_make_request +* and will never complete, so will never reduce nr_pending. +* So increment nr_waiting here so no new raise_barriers will +* succeed, and so the second wait_barrier cannot block. +*/ +spin_lock_irq (&conf->resync_lock); + conf->nr_waiting++; +spin_unlock_irq (&conf->resync_lock); +if (make_request (q, &bp->bio1))generic_make_request (&bp->bio1);if (make_request (q, &bp->bio2))generic_make_request (&bp->bio2); +spin_lock_irq (&conf->resync_lock); + conf->nr_waiting--; +wake_up (&conf->wait_barrier); +spin_unlock_irq (&conf->resync_lock); +bio_pair_release (bp);return 0 ; bad_map:
drivers/net/smsc911x.c +52 -40
165 lines not on this page · raw message
drivers/net/xen-netfront.c +1 -0
@@ -1619,6 +1619,7 @@ static void backend_changed(struct xenbus_device *dev,if (xennet_connect (netdev) !=0 )break ;xenbus_switch_state (dev, XenbusStateConnected); +netif_notify_peers (netdev);break ;case XenbusStateClosing:
drivers/pci/quirks.c +4 -0
@@ -2084,6 +2084,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disablDECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3336 , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3351 , quirk_disable_all_msi);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VT3364 , quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_8380_0 , quirk_disable_all_msi);/* Disable MSI on chipsets that are known to not support it */ static void __devinit quirk_disable_msi (struct pci_dev *dev)
@@ -2356,6 +2357,9 @@ static void __devinit __nv_msi_ht_cap_quirk(struct pci_dev *dev, int all)int pos;int found; +if (!pci_msi_enabled ()) +return ; +/* check if there is HT MSI cap or enabled on this device */ found =ht_check_msi_mapping (dev);
drivers/s390/cio/cio.c +1 -0
@@ -618,6 +618,7 @@ void __irq_entry do_IRQ(struct pt_regs *regs) old_regs =set_irq_regs (regs);s390_idle_check ();irq_enter (); +__get_cpu_var (s390_idle).nohz_delay =1 ;if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator)/* Serve timer interrupts first. */ clock_comparator_work ();
drivers/scsi/aic7xxx/aic79xx_core.c +31 -22
77 lines not on this page · raw message
drivers/scsi/ibmvscsi/ibmvfc.c +7 -1
@@ -1969,7 +1969,7 @@ static int ibmvfc_wait_for_ops(struct ibmvfc_host *vhost, void *device,DECLARE_COMPLETION_ONSTACK (comp);int wait;unsigned long flags; -signed long timeout = init_timeout *HZ ; +signed long timeout =IBMVFC_ABORT_WAIT_TIMEOUT *HZ ;ENTER ; do {
@@ -2720,6 +2720,7 @@ static struct ibmvfc_async_crq *ibmvfc_next_async_crq(struct ibmvfc_host *vhost)if (crq->valid &0x80 ) {if (++async_crq->cur == async_crq->size) async_crq->cur =0 ; +rmb (); }else crq =NULL ;
@@ -2742,6 +2743,7 @@ static struct ibmvfc_crq *ibmvfc_next_crq(struct ibmvfc_host *vhost)if (crq->valid &0x80 ) {if (++queue->cur == queue->size) queue->cur =0 ; +rmb (); }else crq =NULL ;
@@ -2790,12 +2792,14 @@ static void ibmvfc_tasklet(void *data)while ((async =ibmvfc_next_async_crq (vhost)) !=NULL ) {ibmvfc_handle_async (async, vhost); async->valid =0 ; +wmb (); }/* Pull all the valid messages off the CRQ */ while ((crq =ibmvfc_next_crq (vhost)) !=NULL ) {ibmvfc_handle_crq (crq, vhost); crq->valid =0 ; +wmb (); }vio_enable_interrupts (vdev);
@@ -2803,10 +2807,12 @@ static void ibmvfc_tasklet(void *data)vio_disable_interrupts (vdev);ibmvfc_handle_async (async, vhost); async->valid =0 ; +wmb (); }else if ((crq =ibmvfc_next_crq (vhost)) !=NULL ) {vio_disable_interrupts (vdev);ibmvfc_handle_crq (crq, vhost); crq->valid =0 ; +wmb (); }else done =1 ; }
drivers/scsi/ibmvscsi/ibmvfc.h +1 -0
@@ -38,6 +38,7 @@#define IBMVFC_ADISC_PLUS_CANCEL_TIMEOUT \ (IBMVFC_ADISC_TIMEOUT + IBMVFC_ADISC_CANCEL_TIMEOUT)#define IBMVFC_INIT_TIMEOUT 120 +#define IBMVFC_ABORT_WAIT_TIMEOUT 40#define IBMVFC_MAX_REQUESTS_DEFAULT 100#define IBMVFC_DEBUG 0
drivers/staging/line6/Kconfig +1 -0
@@ -2,6 +2,7 @@ config LINE6_USB tristate "Line6 USB support" depends on USB && SND select SND_RAWMIDI + select SND_PCM help This is a driver for the guitar amp, cab, and effects modeller PODxt Pro by Line6 (and similar devices), supporting the
drivers/staging/panel/panel.c +2 -0
@@ -2181,6 +2181,7 @@ int panel_init(void)if (pprt) {parport_release (pprt);parport_unregister_device (pprt); + pprt =NULL ; }parport_unregister_driver (&panel_driver); printk(KERN_ERR "Panel driver version " PANEL_VERSION
@@ -2230,6 +2231,7 @@ static void __exit panel_cleanup_module(void)/* TODO: free all input signals */ parport_release (pprt);parport_unregister_device (pprt); + pprt =NULL ; }parport_unregister_driver (&panel_driver); }
drivers/usb/core/hub.c +5 -1
@@ -22,6 +22,7 @@#include <linux/kthread.h> #include <linux/mutex.h> #include <linux/freezer.h> +#include <linux/usb/quirks.h> #include <asm/uaccess.h> #include <asm/byteorder.h>
@@ -1768,7 +1769,6 @@ int usb_new_device(struct usb_device *udev)if (udev->parent)usb_autoresume_device (udev->parent); -usb_detect_quirks (udev); err =usb_enumerate_device (udev);/* Read descriptors */ if (err <0 ) goto fail;
@@ -3063,6 +3063,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,if (status <0 ) goto loop; +usb_detect_quirks (udev); +if (udev->quirks &USB_QUIRK_DELAY_INIT ) +msleep (1000 ); +/* consecutive bus-powered hubs aren't reliable; they can * violate the voltage drop budget. if the new child has * a "powered" LED, users should notice we didn't enable it
drivers/usb/core/quirks.c +3 -0
@@ -38,6 +38,9 @@ static const struct usb_device_id usb_quirk_list[] = {/* Creative SB Audigy 2 NX */ { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Harmony 700-series */ + { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Philips PSC805 audio device */ { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/core/urb.c +21 -29
88 lines not on this page · raw message
drivers/usb/misc/usbtest.c +5 -1
@@ -1382,7 +1382,6 @@ static void iso_callback (struct urb *urb)break ; } } -simple_free_urb (urb); ctx->pending--;if (ctx->pending ==0 ) {
@@ -1499,6 +1498,7 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, }simple_free_urb (urbs [i]); + urbs[i] =NULL ; context.pending--; context.submit_error =1 ;break ;
@@ -1508,6 +1508,10 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param,wait_for_completion (&context.done); +for (i =0 ; i < param->sglen; i++) { +if (urbs[i]) +simple_free_urb (urbs[i]); + }/* * Isochronous transfers are expected to fail sometimes. As an * arbitrary limit, we will report an error if any submissions
drivers/usb/mon/mon_bin.c +1 -1
@@ -971,7 +971,7 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file,mutex_lock (&rp->fetch_lock);spin_lock_irqsave (&rp->b_lock, flags); -mon_free_buff (rp->b_vec, size/CHUNK_SIZE ); +mon_free_buff (rp->b_vec, rp->b_size/CHUNK_SIZE );kfree (rp->b_vec); rp->b_vec = vec; rp->b_size = size;
drivers/usb/serial/cp210x.c +4 -0
@@ -128,6 +128,10 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ + { USB_DEVICE(0x16DC, 0x0010) }, /* W-IE-NE-R Plein & Baus GmbH PL512 Power Supply */ + { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ + { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ + { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ { } /* Terminating Entry */ };
drivers/usb/serial/ftdi_sio.c +4 -0
@@ -162,6 +162,9 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_5_PID) }, { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_6_PID) }, { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_7_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_USINT_CAT_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_USINT_WKEY_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_USINT_RS232_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ACTZWAVE_PID) }, { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) }, { USB_DEVICE(FTDI_VID, FTDI_IPLUS_PID) },
@@ -752,6 +755,7 @@ static struct usb_device_id id_table_combined [] = { .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) }, { }, /* Optional parameter entry */ { }/* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +10 -0
@@ -40,6 +40,11 @@#define FTDI_NXTCAM_PID 0xABB8/* NXTCam for Mindstorms NXT */ +/* US Interface Navigator (http://www.usinterface.com/) */ +#define FTDI_USINT_CAT_PID 0xb810/* Navigator CAT and 2nd PTT lines */ +#define FTDI_USINT_WKEY_PID 0xb811/* Navigator WKEY and FSK lines */ +#define FTDI_USINT_RS232_PID 0xb812/* Navigator RS232 and CONFIG lines */ +/* OOCDlink by Joern Kaipf <[email protected]> * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ #define FTDI_OOCDLINK_PID 0xbaf8/* Amontec JTAGkey */
@@ -1039,3 +1044,8 @@#define XVERVE_SIGNALYZER_SH2_PID 0xBCA2#define XVERVE_SIGNALYZER_SH4_PID 0xBCA4 +/* +* Segway Robotic Mobility Platform USB interface (using VID 0x0403) +* Submitted by John G. Rogers +*/ +#define SEGWAY_RMP200_PID 0xe729
drivers/usb/serial/option.c +13 -0
@@ -165,7 +165,10 @@ static int option_resume(struct usb_serial *serial);#define HUAWEI_PRODUCT_E143D 0x143D#define HUAWEI_PRODUCT_E143E 0x143E#define HUAWEI_PRODUCT_E143F 0x143F +#define HUAWEI_PRODUCT_K4505 0x1464 +#define HUAWEI_PRODUCT_K3765 0x1465#define HUAWEI_PRODUCT_E14AC 0x14AC +#define HUAWEI_PRODUCT_ETS1220 0x1803#define QUANTA_VENDOR_ID 0x0408#define QUANTA_PRODUCT_Q101 0xEA02
@@ -469,6 +472,9 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
@@ -1007,6 +1013,13 @@ static int option_probe(struct usb_serial *serial, serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff)return -ENODEV ; +/* Don't bind network interfaces on Huawei K3765 & K4505 */ +if (serial->dev->descriptor.idVendor ==HUAWEI_VENDOR_ID && + (serial->dev->descriptor.idProduct ==HUAWEI_PRODUCT_K3765 || + serial->dev->descriptor.idProduct ==HUAWEI_PRODUCT_K4505 ) && + serial->interface->cur_altsetting->desc.bInterfaceNumber ==1 ) +return -ENODEV ; + data = serial->private =kzalloc (sizeof (struct option_intf_private ),GFP_KERNEL );if (!data)return -ENOMEM ;
drivers/video/w100fb.c +2 -2
@@ -857,9 +857,9 @@ unsigned long w100fb_gpio_read(int port)void w100fb_gpio_write (int port,unsigned long value) {if (port==W100_GPIO_PORT_A ) - value =writel (value, remapped_regs + mmGPIO_DATA); +writel (value, remapped_regs + mmGPIO_DATA);else - value =writel (value, remapped_regs + mmGPIO_DATA2); +writel (value, remapped_regs + mmGPIO_DATA2); }EXPORT_SYMBOL (w100fb_gpio_read);EXPORT_SYMBOL (w100fb_gpio_write);
drivers/xen/events.c +1 -0
@@ -535,6 +535,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi,if (irq <0 )return irq; + irqflags |=IRQF_NO_SUSPEND ; retval =request_irq (irq, handler, irqflags, devname, dev_id);if (retval !=0 ) {unbind_from_irq (irq);
fs/block_dev.c +6 -4
@@ -1175,10 +1175,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)/* * hooks: /n/, see "layering violations". */ - ret =devcgroup_inode_permission (bdev->bd_inode, perm); -if (ret !=0 ) { -bdput (bdev); -return ret; +if (!for_part) { + ret =devcgroup_inode_permission (bdev->bd_inode, perm); +if (ret !=0 ) { +bdput (bdev); +return ret; + } }lock_kernel ();
fs/btrfs/acl.c +21 -15
@@ -94,7 +94,8 @@ static int btrfs_xattr_get_acl(struct inode *inode, int type,/* * Needs to be called with fs_mutex held */ -static int btrfs_set_acl (struct inode *inode,struct posix_acl *acl,int type) +static int btrfs_set_acl (struct btrfs_trans_handle *trans, +struct inode *inode,struct posix_acl *acl,int type) {int ret, size =0 ;const char *name;
@@ -111,12 +112,14 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)switch (type) {case ACL_TYPE_ACCESS : mode = inode->i_mode; - ret =posix_acl_equiv_mode (acl, &mode); -if (ret <0 ) -return ret; - ret =0 ; - inode->i_mode = mode; name =POSIX_ACL_XATTR_ACCESS ; +if (acl) { + ret =posix_acl_equiv_mode (acl, &mode); +if (ret <0 ) +return ret; + inode->i_mode = mode; + } + ret =0 ;break ;case ACL_TYPE_DEFAULT :if (!S_ISDIR (inode->i_mode))
@@ -140,8 +143,7 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) goto out; } - ret =__btrfs_setxattr (inode, name, value, size,0 ); - + ret =__btrfs_setxattr (trans, inode, name, value, size,0 ); out:kfree (value);
@@ -154,7 +156,7 @@ out:static int btrfs_xattr_set_acl (struct inode *inode,int type,const void *value,size_t size) { -int ret =0 ; +int ret;struct posix_acl *acl =NULL ;if (!is_owner_or_cap (inode))
@@ -170,7 +172,7 @@ static int btrfs_xattr_set_acl(struct inode *inode, int type, } } - ret =btrfs_set_acl (inode, acl, type); + ret =btrfs_set_acl (NULL , inode, acl, type);posix_acl_release (acl);
@@ -224,7 +226,8 @@ int btrfs_check_acl(struct inode *inode, int mask)* stuff has been fixed to work with that. If the locking stuff changes, we * need to re-evaluate the acl locking stuff. */ -int btrfs_init_acl (struct inode *inode,struct inode *dir) +int btrfs_init_acl (struct btrfs_trans_handle *trans, +struct inode *inode,struct inode *dir) {struct posix_acl *acl =NULL ;int ret =0 ;
@@ -249,7 +252,8 @@ int btrfs_init_acl(struct inode *inode, struct inode *dir)mode_t mode;if (S_ISDIR (inode->i_mode)) { - ret =btrfs_set_acl (inode, acl,ACL_TYPE_DEFAULT ); + ret =btrfs_set_acl (trans, inode, acl, +ACL_TYPE_DEFAULT );if (ret) goto failed; }
@@ -264,10 +268,11 @@ int btrfs_init_acl(struct inode *inode, struct inode *dir) inode->i_mode = mode;if (ret >0 ) {/* we need an acl */ - ret =btrfs_set_acl (inode, clone, + ret =btrfs_set_acl (trans, inode, clone,ACL_TYPE_ACCESS ); } } +posix_acl_release (clone); } failed:posix_acl_release (acl);
@@ -297,7 +302,7 @@ int btrfs_acl_chmod(struct inode *inode) ret =posix_acl_chmod_masq (clone, inode->i_mode);if (!ret) - ret =btrfs_set_acl (inode, clone,ACL_TYPE_ACCESS ); + ret =btrfs_set_acl (NULL , inode, clone,ACL_TYPE_ACCESS );posix_acl_release (clone);
@@ -323,7 +328,8 @@ int btrfs_acl_chmod(struct inode *inode)return 0 ; } -int btrfs_init_acl (struct inode *inode,struct inode *dir) +int btrfs_init_acl (struct btrfs_trans_handle *trans, +struct inode *inode,struct inode *dir) {return 0 ; }
fs/btrfs/btrfs_inode.h +1 -4
@@ -44,9 +44,6 @@ struct btrfs_inode {*/ struct extent_io_tree io_failure_tree; -/* held while inesrting or deleting extents from files */ -struct mutex extent_mutex; -/* held while logging the inode in tree-log.c */ struct mutex log_mutex;
@@ -166,7 +163,7 @@ static inline struct btrfs_inode *BTRFS_I(struct inode *inode)static inline void btrfs_i_size_write (struct inode *inode,u64 size) { - inode->i_size = size; +i_size_write (inode, size);BTRFS_I (inode)->disk_i_size = size; }
fs/btrfs/ctree.c +153 -76
322 lines not on this page · raw message
fs/btrfs/ctree.h +28 -12
@@ -310,6 +310,9 @@ struct btrfs_header {#define BTRFS_MAX_INLINE_DATA_SIZE (r) (BTRFS_LEAF_DATA_SIZE(r) - \ sizeof(struct btrfs_item) - \ sizeof(struct btrfs_file_extent_item)) +#define BTRFS_MAX_XATTR_SIZE (r) (BTRFS_LEAF_DATA_SIZE(r) - \ + sizeof(struct btrfs_item) -\ + sizeof(struct btrfs_dir_item))/*
@@ -859,8 +862,9 @@ struct btrfs_fs_info {struct mutex ordered_operations_mutex;struct rw_semaphore extent_commit_sem; -struct rw_semaphore subvol_sem; +struct rw_semaphore cleanup_work_sem; +struct rw_semaphore subvol_sem;struct srcu_struct subvol_srcu;struct list_head trans_list;
@@ -868,6 +872,9 @@ struct btrfs_fs_info {struct list_head dead_roots;struct list_head caching_block_groups; +spinlock_t delayed_iput_lock; +struct list_head delayed_iputs; +atomic_t nr_async_submits;atomic_t async_submit_draining;atomic_t nr_async_bios;
@@ -1034,12 +1041,12 @@ struct btrfs_root {int ref_cows;int track_dirty;int in_radix; +int clean_orphans;u64 defrag_trans_start;struct btrfs_key defrag_progress;struct btrfs_key defrag_max;int defrag_running; -int defrag_level;char *name;int in_sysfs;
@@ -1975,6 +1982,10 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, u64 parent, u64 root_objectid, struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size); +int btrfs_free_tree_block (struct btrfs_trans_handle *trans, +struct btrfs_root *root, +u64 bytenr,u32 blocksize, +u64 parent,u64 root_objectid,int level); struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u32 blocksize,
@@ -2089,6 +2100,10 @@ int btrfs_split_item(struct btrfs_trans_handle *trans,struct btrfs_path *path, struct btrfs_key *new_key, unsigned long split_offset); +int btrfs_duplicate_item (struct btrfs_trans_handle *trans, +struct btrfs_root *root, +struct btrfs_path *path, +struct btrfs_key *new_key);int btrfs_search_slot (struct btrfs_trans_handle *trans,struct btrfs_root *root,struct btrfs_key *key,struct btrfs_path *p,int ins_len,int cow);
@@ -2196,9 +2211,10 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,struct btrfs_path *path, struct btrfs_dir_item *di);int btrfs_insert_xattr_item (struct btrfs_trans_handle *trans, -struct btrfs_root *root,const char *name, -u16 name_len,const void *data,u16 data_len, -u64 dir); +struct btrfs_root *root, +struct btrfs_path *path,u64 objectid, +const char *name,u16 name_len, +const void *data,u16 data_len); struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir,
@@ -2292,7 +2308,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, struct inode *inode, u64 new_size, u32 min_type); -int btrfs_start_delalloc_inodes (struct btrfs_root *root); +int btrfs_start_delalloc_inodes (struct btrfs_root *root,int delay_iput);int btrfs_set_extent_delalloc (struct inode *inode,u64 start,u64 end);int btrfs_writepages (struct address_space *mapping,struct writeback_control *wbc);
@@ -2332,6 +2348,8 @@ int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode);void btrfs_orphan_cleanup (struct btrfs_root *root);int btrfs_cont_expand (struct inode *inode,loff_t size);int btrfs_invalidate_inodes (struct btrfs_root *root); +void btrfs_add_delayed_iput (struct inode *inode); +void btrfs_run_delayed_iputs (struct btrfs_root *root);extern const struct dentry_operations btrfs_dentry_operations;/* ioctl.c */
@@ -2345,12 +2363,9 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, int skip_pinned);int btrfs_check_file (struct btrfs_root *root,struct inode *inode);extern const struct file_operations btrfs_file_operations; -int btrfs_drop_extents (struct btrfs_trans_handle *trans, -struct btrfs_root *root,struct inode *inode, -u64 start,u64 end,u64 locked_end, -u64 inline_limit,u64 *hint_block,int drop_cache); +int btrfs_drop_extents (struct btrfs_trans_handle *trans,struct inode *inode, +u64 start,u64 end,u64 *hint_byte,int drop_cache);int btrfs_mark_extent_written (struct btrfs_trans_handle *trans, -struct btrfs_root *root,struct inode *inode,u64 start,u64 end);int btrfs_release_file (struct inode *inode,struct file *file);
@@ -2380,7 +2395,8 @@ int btrfs_check_acl(struct inode *inode, int mask);#else #define btrfs_check_acl NULL#endif -int btrfs_init_acl (struct inode *inode,struct inode *dir); +int btrfs_init_acl (struct btrfs_trans_handle *trans, +struct inode *inode,struct inode *dir);int btrfs_acl_chmod (struct inode *inode);/* relocation.c */
fs/btrfs/dir-item.c +7 -12
@@ -68,12 +68,12 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle* into the tree */ int btrfs_insert_xattr_item (struct btrfs_trans_handle *trans, -struct btrfs_root *root,const char *name, -u16 name_len,const void *data,u16 data_len, -u64 dir) +struct btrfs_root *root, +struct btrfs_path *path,u64 objectid, +const char *name,u16 name_len, +const void *data,u16 data_len) {int ret =0 ; -struct btrfs_path *path;struct btrfs_dir_item *dir_item;unsigned long name_ptr, data_ptr;struct btrfs_key key, location;
@@ -81,15 +81,11 @@ int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans,struct extent_buffer *leaf;u32 data_size; - key.objectid = dir; +BUG_ON (name_len + data_len >BTRFS_MAX_XATTR_SIZE (root)); + + key.objectid = objectid;btrfs_set_key_type (&key,BTRFS_XATTR_ITEM_KEY ); key.offset =btrfs_name_hash (name, name_len); - path =btrfs_alloc_path (); -if (!path) -return -ENOMEM ; -if (name_len + data_len +sizeof (struct btrfs_dir_item ) > -BTRFS_LEAF_DATA_SIZE (root) -sizeof (struct btrfs_item )) -return -ENOSPC ; data_size =sizeof (*dir_item) + name_len + data_len; dir_item = insert_with_overflow(trans, root, path, &key, data_size,
@@ -117,7 +113,6 @@ int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans,write_extent_buffer (leaf, data, data_ptr, data_len);btrfs_mark_buffer_dirty (path->nodes[0 ]); -btrfs_free_path (path);return ret; }
fs/btrfs/disk-io.c +30 -10
@@ -892,6 +892,8 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, root->stripesize = stripesize; root->ref_cows =0 ; root->track_dirty =0 ; + root->in_radix =0 ; + root->clean_orphans =0 ; root->fs_info = fs_info; root->objectid = objectid;
@@ -928,7 +930,6 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, root->defrag_trans_start = fs_info->generation;init_completion (&root->kobj_unregister); root->defrag_running =0 ; - root->defrag_level =0 ; root->root_key.objectid = objectid; root->anon_super.s_root =NULL ; root->anon_super.s_dev =0 ;
@@ -980,12 +981,12 @@ int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans,while (1 ) { ret =find_first_extent_bit (&log_root_tree->dirty_log_pages, -0 , &start, &end,EXTENT_DIRTY ); +0 , &start, &end,EXTENT_DIRTY |EXTENT_NEW );if (ret)break ; -clear_extent_dirty (&log_root_tree->dirty_log_pages, - start, end,GFP_NOFS ); +clear_extent_bits (&log_root_tree->dirty_log_pages, start, end, +EXTENT_DIRTY |EXTENT_NEW ,GFP_NOFS ); } eb = fs_info->log_root_tree->node;
@@ -1210,8 +1211,10 @@ again: ret =radix_tree_insert (&fs_info->fs_roots_radix, (unsigned long )root->root_key.objectid, root); -if (ret ==0 ) +if (ret ==0 ) { root->in_radix =1 ; + root->clean_orphans =1 ; + }spin_unlock (&fs_info->fs_roots_radix_lock);radix_tree_preload_end ();if (ret) {
@@ -1225,10 +1228,6 @@ again: ret =btrfs_find_dead_roots (fs_info->tree_root, root->root_key.objectid);WARN_ON (ret); - -if (!(fs_info->sb->s_flags &MS_RDONLY )) -btrfs_orphan_cleanup (root); -return root; fail:free_fs_root (root);
@@ -1477,6 +1476,7 @@ static int cleaner_kthread(void *arg)if (!(root->fs_info->sb->s_flags &MS_RDONLY ) &&mutex_trylock (&root->fs_info->cleaner_mutex)) { +btrfs_run_delayed_iputs (root);btrfs_clean_old_snapshots (root);mutex_unlock (&root->fs_info->cleaner_mutex); }
@@ -1606,6 +1606,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,INIT_RADIX_TREE (&fs_info->fs_roots_radix,GFP_ATOMIC );INIT_LIST_HEAD (&fs_info->trans_list);INIT_LIST_HEAD (&fs_info->dead_roots); +INIT_LIST_HEAD (&fs_info->delayed_iputs);INIT_LIST_HEAD (&fs_info->hashers);INIT_LIST_HEAD (&fs_info->delalloc_inodes);INIT_LIST_HEAD (&fs_info->ordered_operations);
@@ -1614,6 +1615,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,spin_lock_init (&fs_info->new_trans_lock);spin_lock_init (&fs_info->ref_cache_lock);spin_lock_init (&fs_info->fs_roots_radix_lock); +spin_lock_init (&fs_info->delayed_iput_lock);init_completion (&fs_info->kobj_unregister); fs_info->tree_root = tree_root;
@@ -1689,6 +1691,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,mutex_init (&fs_info->cleaner_mutex);mutex_init (&fs_info->volume_mutex);init_rwsem (&fs_info->extent_commit_sem); +init_rwsem (&fs_info->cleanup_work_sem);init_rwsem (&fs_info->subvol_sem);btrfs_init_free_cluster (&fs_info->meta_alloc_cluster);
@@ -1979,7 +1982,12 @@ struct btrfs_root *open_ctree(struct super_block *sb,if (!(sb->s_flags &MS_RDONLY )) { ret =btrfs_recover_relocation (tree_root); -BUG_ON (ret); +if (ret <0 ) { +printk (KERN_WARNING +"btrfs: failed to recover relocation\n" ); + err = -EINVAL ; + goto fail_trans_kthread; + } } location.objectid =BTRFS_FS_TREE_OBJECTID ;
@@ -1990,6 +1998,12 @@ struct btrfs_root *open_ctree(struct super_block *sb,if (!fs_info->fs_root) goto fail_trans_kthread; +if (!(sb->s_flags &MS_RDONLY )) { +down_read (&fs_info->cleanup_work_sem); +btrfs_orphan_cleanup (fs_info->fs_root); +up_read (&fs_info->cleanup_work_sem); + } +return tree_root; fail_trans_kthread:
@@ -2386,8 +2400,14 @@ int btrfs_commit_super(struct btrfs_root *root)int ret;mutex_lock (&root->fs_info->cleaner_mutex); +btrfs_run_delayed_iputs (root);btrfs_clean_old_snapshots (root);mutex_unlock (&root->fs_info->cleaner_mutex); + +/* wait until ongoing cleanup work done */ +down_write (&root->fs_info->cleanup_work_sem); +up_write (&root->fs_info->cleanup_work_sem); + trans =btrfs_start_transaction (root,1 ); ret =btrfs_commit_transaction (trans, root);BUG_ON (ret);
fs/btrfs/extent-tree.c +70 -42
241 lines not on this page · raw message
fs/btrfs/extent_io.c +1 -2
@@ -3165,10 +3165,9 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,spin_unlock (&tree->buffer_lock); goto free_eb; } -spin_unlock (&tree->buffer_lock); -/* add one reference for the tree */ atomic_inc (&eb->refs); +spin_unlock (&tree->buffer_lock);return eb; free_eb:
fs/btrfs/file.c +327 -402
296 lines not on this page · raw message
fs/btrfs/inode.c +371 -253
624 lines not on this page · raw message
fs/btrfs/ordered-data.c +90 -27
117 lines not on this page · raw message
fs/btrfs/relocation.c +27 -16
43 lines not on this page · raw message
fs/btrfs/transaction.c +26 -18
44 lines not on this page · raw message
fs/btrfs/tree-log.c +46 -40
86 lines not on this page · raw message
fs/btrfs/xattr.c +54 -26
80 lines not on this page · raw message
fs/dlm/ast.c +58 -16
74 lines not on this page · raw message
fs/dlm/lock.c +89 -31
120 lines not on this page · raw message
fs/ecryptfs/file.c +37 -23
60 lines not on this page · raw message
fs/jfs/xattr.c +38 -49
87 lines not on this page · raw message
fs/ocfs2/refcounttree.c +109 -8
117 lines not on this page · raw message
kernel/sched.c +58 -13
71 lines not on this page · raw message
kernel/time/tick-sched.c +41 -34
75 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.