aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-24fs: move i_sb_list out from under inode_lockDave Chinner6-56/+67
Protect the per-sb inode list with a new global lock inode_sb_list_lock and use it to protect the list manipulations and traversals. This lock replaces the inode_lock as the inodes on the list can be validity checked while holding the inode->i_lock and hence the inode_lock is no longer needed to protect the list. Signed-off-by: Dave Chinner <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24fs: remove inode_lock from iput_final and prune_icacheDave Chinner5-22/+17
Now that inode state changes are protected by the inode->i_lock and the inode LRU manipulations by the inode_lru_lock, we can remove the inode_lock from prune_icache and the initial part of iput_final(). instead of using the inode_lock to protect the inode during iput_final, use the inode->i_lock instead. This protects the inode against new references being taken while we change the inode state to I_FREEING, as well as preventing prune_icache from grabbing the inode while we are manipulating it. Hence we no longer need the inode_lock in iput_final prior to setting I_FREEING on the inode. For prune_icache, we no longer need the inode_lock to protect the LRU list, and the inodes themselves are protected against freeing races by the inode->i_lock. Hence we can lift the inode_lock from prune_icache as well. Signed-off-by: Dave Chinner <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24fs: Lock the inode LRU list separatelyDave Chinner1-9/+30
Introduce the inode_lru_lock to protect the inode_lru list. This lock is nested inside the inode->i_lock to allow the inode to be added to the LRU list in iput_final without needing to deal with lock inversions. This keeps iput_final() clean and neat. Further, where marking the inode I_FREEING and removing it from the LRU, move the LRU list manipulation within the inode->i_lock to keep the list manipulation consistent with iput_final. This also means that most of the open coded LRU list removal + unused inode accounting can now use the inode_lru_list_del() wrappers which cleans the code up further. However, this locking change means what the LRU traversal in prune_icache() inverts this lock ordering and needs to use trylock semantics on the inode->i_lock to avoid deadlocking. In these cases, if we fail to lock the inode we move it to the back of the LRU to prevent spinning on it. Signed-off-by: Dave Chinner <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24fs: factor inode disposalDave Chinner1-63/+41
We have a couple of places that dispose of inodes. factor the disposal into evict() to isolate this code and make it simpler to peel away the inode_lock from the code. While doing this, change the logic flow in iput_final() to separate the different cases that need to be handled to make the transitions the inode goes through more obvious. Signed-off-by: Dave Chinner <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24fs: protect inode->i_state with inode->i_lockDave Chinner11-74/+174
Protect inode state transitions and validity checks with the inode->i_lock. This enables us to make inode state transitions independently of the inode_lock and is the first step to peeling away the inode_lock from the code. This requires that __iget() is done atomically with i_state checks during list traversals so that we don't race with another thread marking the inode I_FREEING between the state check and grabbing the reference. Also remove the unlock_new_inode() memory barrier optimisation required to avoid taking the inode_lock when clearing I_NEW. Simplify the code by simply taking the inode->i_lock around the state change and wakeup. Because the wakeup is no longer tricky, remove the wake_up_inode() function and open code the wakeup where necessary. Signed-off-by: Dave Chinner <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24ipv4: Fix nexthop caching wrt. scoping.David S. Miller4-20/+16
Move the scope value out of the fib alias entries and into fib_info, so that we always use the correct scope when recomputing the nexthop cached source address. Reported-by: Julian Anastasov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-24Merge branch 'slab/urgent' of ↵Linus Torvalds1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: SLUB: Write to per cpu data when allocating it slub: Fix debugobjects with lockless fastpath
2011-03-24lib, arch: add filter argument to show_mem and fix private implementationsDavid Rientjes14-21/+15
Commit ddd588b5dd55 ("oom: suppress nodes that are not allowed from meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which resulted in build warnings on all architectures that implement their own versions of show_mem(): lib/lib.a(show_mem.o): In function `show_mem': show_mem.c:(.text+0x1f4): multiple definition of `show_mem' arch/sparc/mm/built-in.o:(.text+0xd70): first defined here The fix is to remove __show_mem() and add its argument to show_mem() in all implementations to prevent this breakage. Architectures that implement their own show_mem() actually don't do anything with the argument yet, but they could be made to filter nodes that aren't allowed in the current context in the future just like the generic implementation. Reported-by: Stephen Rothwell <[email protected]> Reported-by: James Bottomley <[email protected]> Suggested-by: Andrew Morton <[email protected]> Signed-off-by: David Rientjes <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-24ipv4: Invalidate nexthop cache nh_saddr more correctly.David S. Miller5-29/+33
Any operation that: 1) Brings up an interface 2) Adds an IP address to an interface 3) Deletes an IP address from an interface can potentially invalidate the nh_saddr value, requiring it to be recomputed. Perform the recomputation lazily using a generation ID. Reported-by: Julian Anastasov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-24Merge branch 'drm-core-next' of ↵Linus Torvalds16-145/+250
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/vblank: update recently added vbl interface to be more future proof. drm radeon: Return -EINVAL on wrong pm sysfs access drm/radeon/kms: fix hardcoded EDID handling Revert "drm/i915: Don't save/restore hardware status page address register" drm/i915: Avoid unmapping pages from a NULL address space drm/i915: Fix use after free within tracepoint drm/i915: Restore missing command flush before interrupt on BLT ring drm/i915: Disable pagefaults along execbuffer relocation fast path drm/i915: Fix computation of pitch for dumb bo creator drm/i915: report correct render clock frequencies on SNB drm/i915/dp: Correct the order of deletion for ghost eDP devices drm/i915: Fix tiling corruption from pipelined fencing drm/i915: Re-enable self-refresh drm/i915: Prevent racy removal of request from client list drm/i915: skip redundant operations whilst enabling pipes and planes drm/i915: Remove surplus POSTING_READs before wait_for_vblank drm/radeon/kms: prefer legacy pll algo for tv-out drm: check for modesetting on modeset ioctls drm/kernel: vblank wait on crtc > 1 drm: Fix use-after-free in drm_gem_vm_close()
2011-03-24RDMA/nes: Fix test of uninitialized netdevRoland Dreier1-1/+1
Commit 1765a575334f ("net: make dev->master general") introduced a test of an uninitialized netdev. Fix the code so the intended netdev is tested. Signed-off-by: Roland Dreier <[email protected]>
2011-03-24sparc32: Fix multiple RTC detections on SUN4DKjetil Oftedal1-0/+4
During the preparation for testing the recent changes made to the SUN4D specific code in the kernel by Sam Ravnborg the following was discovered: Since the removal of of_platform_bus_type (commit: eca3930163ba8884060ce9d9ff5ef0d9b7c7b00f ) multiboard SUN4Ds have not been able to boot. The kernel crashes due to a zero-pointer error encountered when registering multiple M48T59 RTCs (There is one on each board). A patch for the was previously submitted, but the problem was not a serious at that time, as it would only generate warnings. Now the kernel will crash and stop executing before the serial console has been started. (Crash output can be viewed by using the -p boot flag) Signed-off-by: Kjetil Oftedal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-24net: fix pch_gbe section mismatch warningRandy Dunlap1-3/+3
Fix section mismatch warning by renaming the pci_driver variable to a recognized (whitelisted) name. WARNING: drivers/net/pch_gbe/pch_gbe.o(.data+0x1f8): Section mismatch in reference from the variable pch_gbe_pcidev to the variable .devinit.rodata:pch_gbe_pcidev_id The variable pch_gbe_pcidev references the variable __devinitconst pch_gbe_pcidev_id If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-25gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handlerThomas Gleixner2-4/+3
Converted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Grant Likely <[email protected]> LKML-Reference: <[email protected]>
2011-03-25gpio: Cleanup genirq namespaceThomas Gleixner9-50/+50
Converted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Grant Likely <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-25arm: ep93xx: Add basic interrupt infoRyan Mallon1-3/+4
For the time being can we fix up the ep93xx gpio code with the amended patch below. It keeps the information that the pin is also configured as an interrupt and cleans the code up a bit. [ tglx: Rebased it on the removal patch ] Signed-off-by: Ryan Mallon <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-25arm/gpio: Remove three copies of broken and racy debug codeThomas Gleixner3-129/+0
gpiolib plus two gpio implementations in arm fiddle in the guts of irq_desc in a racy and buggy way. Remove the stuff. I already told the gpio folks that we can provide that information in a proper way if necessary. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Grant Likely <[email protected]> LKML-Reference: <[email protected]>
2011-03-24x86: DT: Cleanup namespace and call irq_set_irq_type() unconditionalThomas Gleixner1-3/+1
That call escaped the name space cleanup. Fix it up. We really want to call there. The chip might have changed since the irq was setup initially. So let the core code and the chip decide what to do. The status is just an unreliable snapshot. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]>
2011-03-24x86: DT: Fix return condition in irq_create_of_mapping()Thomas Gleixner1-1/+1
The xlate() function returns 0 or a negative error code. Returning the error code blindly will be seen as an huge irq number by the calling function because irq_create_of_mapping() returns an unsigned value. Return 0 (NO_IRQ) as required. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]>
2011-03-24Merge branch 'nfs-for-2.6.39' into nfs-for-nextTrond Myklebust21-193/+1237
2011-03-24Cleanup XDR parsing for LAYOUTGET, GETDEVICEINFOWeston Andros Adamson7-86/+230
changes LAYOUTGET and GETDEVICEINFO XDR parsing to: - not use vmap, which doesn't work on incoherent archs - use xdr_stream parsing for all xdr Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-24perf, x86: P4 PMU - Read proper MSR register to catch unflagged overflowsDon Zickus1-0/+1
The read of a proper MSR register was missed and instead of counter the configration register was tested (it has ARCH_P4_UNFLAGGED_BIT always cleared) leading to unknown NMI hitting the system. As result the user may obtain "Dazed and confused, but trying to continue" message. Fix it by reading a proper MSR register. When an NMI happens on a P4, the perf nmi handler checks the configuration register to see if the overflow bit is set or not before taking appropriate action. Unfortunately, various P4 machines had a broken overflow bit, so a backup mechanism was implemented. This mechanism checked to see if the counter rolled over or not. A previous commit that implemented this backup mechanism was broken. Instead of reading the counter register, it used the configuration register to determine if the counter rolled over or not. Reading that bit would give incorrect results. This would lead to 'Dazed and confused' messages for the end user when using the perf tool (or if the nmi watchdog is running). The fix is to read the counter register before determining if the counter rolled over or not. Signed-off-by: Don Zickus <[email protected]> Signed-off-by: Cyrill Gorcunov <[email protected]> Cc: Lin Ming <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2011-03-24SLUB: Write to per cpu data when allocating itChristoph Lameter1-1/+1
It turns out that the cmpxchg16b emulation has to access vmalloced percpu memory with interrupts disabled. If the memory has never been touched before then the fault necessary to establish the mapping will not to occur and the kernel will fail on boot. Fix that by reusing the CONFIG_PREEMPT code that writes the cpu number into a field on every cpu. Writing to the per cpu area before causes the mapping to be established before we get to a cmpxchg16b emulation. Tested-by: Ingo Molnar <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
2011-03-24NFSv4.1 convert layoutcommit sync to booleanAndy Adamson6-10/+12
Signed-off-by: Andy Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-24NFSv4.1 pnfs_layoutcommit_inode fixesAndy Adamson1-11/+19
Test NFS_INO_LAYOUTCOMMIT before kzalloc Mark inode dirty to retry LAYOUTCOMMIT on kzalloc failure. Add comments. Signed-off-by: Andy Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2011-03-24xtensa: Use generic show_interrupts()Thomas Gleixner2-44/+10
Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24xtensa: Convert genirq namespaceThomas Gleixner3-13/+13
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATEDThomas Gleixner1-3/+2
All chips converted. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Chris Zankel <[email protected]> LKML-Reference: <[email protected]>
2011-03-24xtensa: Convert s6000 gpio irq_chip to new functionsThomas Gleixner1-18/+17
Also use proper wrappers for irq_desc access. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Chris Zankel <[email protected]> LKML-Reference: <[email protected]>
2011-03-24xtensa: Convert main irq_chip to new functionsThomas Gleixner1-22/+21
Signed-off-by: Thomas Gleixner <[email protected]> Cc: Chris Zankel <[email protected]> LKML-Reference: <[email protected]>
2011-03-24um: Use generic show_interrupts()Thomas Gleixner2-46/+1
Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24um: Convert genirq namespaceThomas Gleixner1-5/+4
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24m32r: Use generic show_interrupts()Thomas Gleixner2-45/+1
Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24m32r: Convert genirq namespaceThomas Gleixner8-75/+75
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24h8300: Use generic show_interrupts()Thomas Gleixner2-31/+1
Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24h8300: Convert genirq namespaceThomas Gleixner1-1/+1
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]>
2011-03-24avr32: Cleanup eic_set_irq_type()Thomas Gleixner1-20/+11
No need to fiddle in irq_desc. The trigger mask can be written back into irq_data. Return IRQ_SET_MASK_OK_NOCOPY, so the generic code wont overwrite it again. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]>
2011-03-24avr32: Use generic show_interrupts()Thomas Gleixner2-37/+1
Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]>
2011-03-24avr: Cleanup genirq namespaceThomas Gleixner5-17/+17
Scripted conversion to new function names with coccinelle. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]>
2011-03-24avr32: Use generic IRQ config, enable GENERIC_HARDIRQS_NO_DEPRECATEDThomas Gleixner1-9/+4
Use the generic Kconfig for interrupts and enable GENERIC_HARDIRQS_NO_DEPRECATED. All conversions done. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> LKML-Reference: <[email protected]>
2011-03-24avr32: At32ap: Convert pop irq_chip to new functionsThomas Gleixner1-13/+10
Also replace the open coded handler call with the proper wrapper. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> LKML-Reference: <[email protected]>
2011-03-24avr32: At32ap: Convert intc irq_chip to new functionsThomas Gleixner1-7/+5
Also replace the open coded handler call with the proper wrapper. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> LKML-Reference: <[email protected]>
2011-03-24avr32: At32ap: Convert extint irq_chip to new functionsThomas Gleixner1-22/+23
Signed-off-by: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> LKML-Reference: <[email protected]>
2011-03-24slub: Fix debugobjects with lockless fastpathThomas Gleixner1-2/+2
On Thu, 24 Mar 2011, Ingo Molnar wrote: > RIP: 0010:[<ffffffff810570a9>] [<ffffffff810570a9>] get_next_timer_interrupt+0x119/0x260 That's a typical timer crash, but you were unable to debug it with debugobjects because commit d3f661d6 broke those. Cc: Christoph Lameter <[email protected]> Tested-by: Ingo Molnar <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Pekka Enberg <[email protected]>
2011-03-24autofs4: Do not potentially dereference NULL pointer returned by fget() in ↵Jesper Juhl1-0/+4
autofs_dev_ioctl_setpipefd() In fs/autofs4/dev-ioctl.c::autofs_dev_ioctl_setpipefd() we call fget(), which may return NULL, but we do not explicitly test for that NULL return so we may end up dereferencing a NULL pointer - bad. When I originally submitted this patch I had chosen EBUSY as the return value to use if this happens. Ian Kent was kind enough to explain why that would most likely be wrong and why EBADF should most likely be used instead. This version of the patch uses EBADF. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24autofs4 - remove autofs4_lockIan Kent4-31/+20
The autofs4_lock introduced by the rcu-walk changes has unnecessarily broad scope. The locking is better handled by the per-autofs super block lookup_lock. Signed-off-by: Ian Kent <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24autofs4 - fix d_manage() return on rcu-walkIan Kent1-0/+2
The daemon never needs to block and, in the rcu-walk case an error return isn't used, so always return zero. Signed-off-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24autofs4 - fix autofs4_expire_indirect() traversalIan Kent1-1/+51
The vfs-scale changes changed the traversal used in autofs4_expire_indirect() from a list to a depth first tree traversal which isn't right. Signed-off-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24autofs4 - fix dentry leak in autofs4_expire_direct()Ian Kent1-4/+3
There is a missing dput() when returning from autofs4_expire_direct() when we see that the dentry is already a pending mount. Signed-off-by: Ian Kent <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-03-24autofs4 - reinstate last used update on accessIan Kent2-34/+14
When direct (and offset) mounts were introduced the the last used timeout could no longer be updated in ->d_revalidate(). This is because covered direct mounts would be followed over without calling the autofs file system. As a result the definition of the busyness check for all entries was changed to be "actually busy" being an open file or working directory within the automount. But now we have a call back in the follow so the last used update on any access can be re-instated. This requires DCACHE_MANAGE_TRANSIT to always be set. Signed-off-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>