aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-04-07Merge branch 'fix/asoc' into for-linusTakashi Iwai28-146/+252
2010-04-07Merge branch 'fix/misc' into for-linusTakashi Iwai4-15/+18
2010-04-07microblaze: Enable memory leak detectorMichal Simek1-1/+1
Enable DEBUG_KMEMLEAK for microblaze Signed-off-by: Michal Simek <[email protected]>
2010-04-07microblaze: Fix futex codeMichal Simek1-1/+1
Use logical and NOT for ANDN. It was likely type fault. Signed-off-by: Michal Simek <[email protected]>
2010-04-07microblaze: Fix ftrace_update_ftrace_func panicSteven J. Magnani1-9/+3
The Microblaze dynamic ftrace code assumes a call ordering that is not met in all scenarios. Specifically, executing a command similar to: echo 105 > /sys/kernel/debug/tracing/set_ftrace_pid before any other tracing-related commands results in a kernel panic: BUG: failure at arch/microblaze/kernel/ftrace.c:198/ftrace_update_ftrace_func()! Recoding ftrace_update_ftrace_func() to use &ftrace_caller directly eliminates the need to capture its address elsewhere (and thus rely on a particular call sequence). Signed-off-by: Steven J. Magnani <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2010-04-07drm/radeon/kms/combios: verify dac_adj values are validAlex Deucher1-5/+15
Some vbios dac_adj tables are all zeros. Check for that case and use the default table if so. Should fix fdo bug 27478. Signed-off-by: Alex Deucher <[email protected]> Cc: stable <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms: clean up atom dac handlingAlex Deucher1-14/+7
- make sure legacy dac1 has an enc priv - remove unused num var - no need for extra tv_dac var in atom dac functions Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms: legacy tv dac cleanupAlex Deucher1-25/+33
- fix formatting - clean up tv_dac_cntl handling for tv Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/radeon/kms: small memory leak in atom exit codeDan Carpenter1-2/+5
This is an unlikely memory leak, but we may as well fix it. It's easy to fix and every static checker will complain if we don't. Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-07drm/edid/quirks: Envision EN2028Adam Jackson1-0/+2
Claims 1280x1024 preferred, physically 1600x1200 cf. http://bugzilla.redhat.com/530399 Signed-off-by: Adam Jackson <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2010-04-06ide: Fix IDE taskfile with cfq schedulerMikulas Patocka1-4/+2
When ide taskfile access is being used (for example with hdparm --security commands) and cfq scheduler is selected, the scheduler crashes on BUG in cfq_put_request. The reason is that the cfq scheduler is tracking counts of read and write requests separately; the ide-taskfile subsystem allocates a read request and then flips the flag to make it a write request. The counters in cfq will mismatch. This patch changes ide-taskfile to allocate the READ or WRITE request as required and don't change the flag later. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-04-07nodemask: include slab.h from drivers/base/node.cTejun Heo1-1/+1
NODEMASK_ALLOC/FREE are mapped to kmalloc/free if NODES_SHIFT > 8. Among its several users, drivers/base/node.c wasn't including slab.h leading to build failure if NODES_SHIFT > 8. Include slab.h from drivers/base/node.c. This isn't an ideal solution but including slab.h directly from nodemask.h is not an option because nodemask.h gets included everywhere. For now, make it work by including slab.h from its users. Signed-off-by: Tejun Heo <[email protected]> Reported-by: Ingo Molnar <[email protected]>
2010-04-06Merge branches 'battery', 'bugzilla-14667', 'bugzilla-15096', ↵Len Brown4360-3753/+8784
'bugzilla-15480', 'bugzilla-15521', 'bugzilla-15605', 'gpe-reference-counters', 'misc', 'pxm-fix' and 'video-random-key' into release
2010-04-06ACPI / PM: Move ACPI video resume to a PM notifierRafael J. Wysocki1-8/+30
There is a problem with the ACPI video resume routine that it's executed before the GPU that may be accessed by it. To fix this issue, move the ACPI video resume to a power management notifier, so that's executed after resuming all devices, including the GPU. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15096, which is a listed regression from 2.6.31. Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Rafał Miłecki <[email protected]> Acked-by: Matthew Garrett <[email protected]> Signed-off-by: Len Brown <[email protected]>
2010-04-06Merge branch 'urgent' of ↵Linus Torvalds1-17/+14
git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 * 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: pcmcia: fix up alignf issues
2010-04-06Merge branch 'irq-core-for-linus' of ↵Linus Torvalds1-0/+10
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: genirq: Force MSI irq handlers to run with interrupts disabled
2010-04-06not overwriting file_lock structure after GET_LKPavel Shilovsky2-3/+40
If we have preventing lock, cifs should overwrite file_lock structure with info about preventing lock. If we haven't preventing lock, cifs should leave it unchanged except for the lock type (change it to F_UNLCK). Signed-off-by: Pavel Shilovsky <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2010-04-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds7-21/+109
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] hpwdt - fix lower timeout limit [WATCHDOG] iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs [WATCHDOG] doc: Fix use of WDIOC_SETOPTIONS ioctl. [WATCHDOG] doc: watchdog simple example: don't fail on fsync() [WATCHDOG] set max63xx driver as ARM only [WATCHDOG] powerpc: pika_wdt ident cannot be const
2010-04-06ALSA: mixart: range checking proc fileDan Carpenter1-10/+14
The original code doesn't take into consideration that the value of MIXART_BA0_SIZE - pos can be less than zero which would lead to a large unsigned value for "count". Also I moved the check that read size is a multiple of 4 bytes below the code that adjusts "count". Signed-off-by: Dan Carpenter <[email protected]> Cc: <[email protected]> Acked-by: Linus Torvalds <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-04-06perf, x86: Enable Nehalem-EX supportVince Weaver1-0/+1
According to Intel Software Devel Manual Volume 3B, the Nehalem-EX PMU is just like regular Nehalem (except for the uncore support, which is completely different). Signed-off-by: Vince Weaver <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Lin Ming <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-04-06perf kmem: Fix breakage introduced by 5a0e3ad slab.h scriptArnaldo Carvalho de Melo1-1/+0
Commit 5a0e3ad ("include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h") added a '#include <linux/slab.h>' to tools/perf/builtin-kmem.h because: that tool has lines like this: if (!strcmp(event->name, "kmalloc") || !strcmp(event->name, "kmem_cache_alloc")) { process_alloc_event(data, event, cpu, timestamp, thread, 0); return; } So, using the script regex: >>> import re >>> s = re.compile(r'^(|.*[^a-zA-Z0-9_])_*(slab_is_available|kmem_cache_|k[mzc]alloc|krealloc|kz?free|ksize|__getname|putname)') >>> l = ' !strcmp(event->name, "kmem_cache_alloc")) {' >>> s.search(l) <_sre.SRE_Match object at 0xb77b1ad0> >>> Remove that file that is not available in the tools/perf include path and thus builtin-kmem.c couldn't be compiled. Reported-by: Peter Zijlstra <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Frédéric Weisbecker <[email protected]> Cc: Lee Schermerhorn <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Linus Torvalds <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-04-06Merge branch 'upstream-linus' of ↵Linus Torvalds3-33/+49
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: unlock HPA if device shrunk libata: disable NCQ on Crucial C300 SSD libata: don't whine on spurious IRQ
2010-04-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds47-131/+14221
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits) smc91c92_cs: fix the problem of "Unable to find hardware address" r8169: clean up my printk uglyness net: Hook up cxgb4 to Kconfig and Makefile cxgb4: Add main driver file and driver Makefile cxgb4: Add remaining driver headers and L2T management cxgb4: Add packet queues and packet DMA code cxgb4: Add HW and FW support code cxgb4: Add register, message, and FW definitions netlabel: Fix several rcu_dereference() calls used without RCU read locks bonding: fix potential deadlock in bond_uninit() net: check the length of the socket address passed to connect(2) stmmac: add documentation for the driver. stmmac: fix kconfig for crc32 build error be2net: fix bug in vlan rx path for big endian architecture be2net: fix flashing on big endian architectures be2net: fix a bug in flashing the redboot section bonding: bond_xmit_roundrobin() fix drivers/net: Add missing unlock net: gianfar - align BD ring size console messages net: gianfar - initialize per-queue statistics ...
2010-04-06proc: copy_to_user() returns unsignedDan Carpenter1-1/+1
copy_to_user() returns the number of bytes left to be copied. This was a typo from: d82ef020cf31 "proc: pagemap: Hold mmap_sem during page walk". Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Matt Mackall <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-04-06libata: unlock HPA if device shrunkTejun Heo2-29/+46
Some BIOSes don't configure HPA during boot but do so while resuming. This causes harddrives to shrink during resume making libata detach and reattach them. This can be worked around by unlocking HPA if old size equals native size. Add ATA_DFLAG_UNLOCK_HPA so that HPA unlocking can be controlled per-device and update ata_dev_revalidate() such that it sets ATA_DFLAG_UNLOCK_HPA and fails with -EIO when the above condition is detected. This patch fixes the following bug. https://bugzilla.kernel.org/show_bug.cgi?id=15396 Signed-off-by: Tejun Heo <[email protected]> Reported-by: Oleksandr Yermolenko <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2010-04-06libata: disable NCQ on Crucial C300 SSDTejun Heo1-0/+3
Crucial said, Thank you for contacting us. We know that with our M225 line of SSDs you sometimes need to disable NCQ (native command queuing) to avoid just the type of errors you're seeing. Our recommendation for the M225 is to add libata.force=noncq to your Linux kernel boot options, under the kernel ATA library option. I have sent your feedback to the engineers working on the C300, and asked them to please pass it on to the firmware team. I have been notified that they are in the process of testing and finalizing a new firmware version, that you can expect to see released around the end of April. We’ll keep you posted as to when it will be available for download. So, turn off NCQ on the drive w/ the current firmware revision. Reported in the following bug. https://bugzilla.kernel.org/show_bug.cgi?id=15573 Signed-off-by: Tejun Heo <[email protected]> Reported-by: [email protected] Reported-by: Luke Macken <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2010-04-06libata: don't whine on spurious IRQTejun Heo1-4/+0
On configurations where IRQ line is shared with a different controller, spurious IRQs may happen continuously. The message was put there primarily for debugging anyway. Kill it. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
2010-04-06[WATCHDOG] hpwdt - fix lower timeout limitThomas Mingarelli1-1/+1
[Novell Bug 581103] HP Watchdog driver has arbitrary (wrong) timeout limits. Fix the lower timeout limit to a more appropriate value. Signed-off-by: Thomas Mingarelli <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Cc: stable <[email protected]>
2010-04-06[WATCHDOG] iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point ↵Seth Heasley1-6/+93
DeviceIDs This patch adds the Intel Cougar Point PCH LPC Controller DeviceIDs for iTCO Watchdog. Signed-off-by: Seth Heasley <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Cc: stable <[email protected]>
2010-04-06[WATCHDOG] doc: Fix use of WDIOC_SETOPTIONS ioctl.James Hogan2-5/+8
In the watchdog-test program and watchdog-api.txt, pass the values to the WDIOC_SETOPTIONS ioctl as a pointer to an integer containing the values intead of directly in the third ioctl argument. The actual watchdog drivers in drivers/watchdog don't read the options directly from the argument but use get_user and copy_from_user. Signed-off-by: James Hogan <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2010-04-06sched: Fix sched_getaffinity()Anton Blanchard1-1/+1
taskset on 2.6.34-rc3 fails on one of my ppc64 test boxes with the following error: sched_getaffinity(0, 16, 0x10029650030) = -1 EINVAL (Invalid argument) This box has 128 threads and 16 bytes is enough to cover it. Commit cd3d8031eb4311e516329aee03c79a08333141f1 (sched: sched_getaffinity(): Allow less than NR_CPUS length) is comparing this 16 bytes agains nr_cpu_ids. Fix it by comparing nr_cpu_ids to the number of bits in the cpumask we pass in. Signed-off-by: Anton Blanchard <[email protected]> Reviewed-by: KOSAKI Motohiro <[email protected]> Cc: Sharyathi Nagesh <[email protected]> Cc: Ulrich Drepper <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Jack Steiner <[email protected]> Cc: Russ Anderson <[email protected]> Cc: Mike Travis <[email protected]> LKML-Reference: <20100406070218.GM5594@kryten> Signed-off-by: Ingo Molnar <[email protected]>
2010-04-06drm/radeon/kms: fix washed out image on legacy tv dacAlex Deucher1-1/+1
bad cast was overwriting the tvdac adj values Fixes fdo bug 27478 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2010-04-05Fix up possibly racy module refcountingNick Piggin2-15/+34
Module refcounting is implemented with a per-cpu counter for speed. However there is a race when tallying the counter where a reference may be taken by one CPU and released by another. Reference count summation may then see the decrement without having seen the previous increment, leading to lower than expected count. A module which never has its actual reference drop below 1 may return a reference count of 0 due to this race. Module removal generally runs under stop_machine, which prevents this race causing bugs due to removal of in-use modules. However there are other real bugs in module.c code and driver code (module_refcount is exported) where the callers do not run under stop_machine. Fix this by maintaining running per-cpu counters for the number of module refcount increments and the number of refcount decrements. The increments are tallied after the decrements, so any decrement seen will always have its corresponding increment counted. The final refcount is the difference of the total increments and decrements, preventing a low-refcount from being returned. Signed-off-by: Nick Piggin <[email protected]> Acked-by: Rusty Russell <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-04-06drm/radeon/kms/atom: fix gpio i2c table overrun (v2)Alex Deucher1-4/+7
The GPIO_I2C_INFO table does not always have ATOM_MAX_SUPPORTED_DEVICE entries. Limit the number of indices to the size of the table. Should fix Novell bug 589022. v2: fix typo Signed-off-by: Alex Deucher <[email protected]> Cc: Stable <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-06drm/radeon: R300 AD only has one quad pipe.Michel Dänzer2-6/+9
Gleaned from the Mesa code. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27355 . Signed-off-by: Michel Dänzer <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2010-04-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds11-84/+172
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] qla1280: retain firmware for error recovery [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init [SCSI] advansys: fix regression with request_firmware change [SCSI] qla2xxx: Updated version number to 8.03.02-k2. [SCSI] qla2xxx: Prevent sending mbx commands from sysfs during isp reset. [SCSI] qla2xxx: Disable MSI on qla24xx chips other than QLA2432. [SCSI] qla2xxx: Check to make sure multique and CPU affinity support is not enabled at the same time. [SCSI] qla2xxx: Correct vp_idx checking during PORT_UPDATE processing. [SCSI] qla2xxx: Honour "Extended BB credits" bit for CNAs. [SCSI] scsi_transport_fc: Make sure commands are completed when rport is offline [SCSI] libiscsi: Fix recovery slowdown regression
2010-04-05davinci: DM365: fix duplicate default IRQ prioritiesKevin Hilman1-1/+0
IRQ 29 has two possible interrupts DDRINT and RTC, but having both in the default priority table is confusing (and triggers a warning from sparse.) This patch removes the lower priority DDRINT from the default priority table leaving the RTC setting as the default. Signed-off-by: Kevin Hilman <[email protected]>
2010-04-05davinci: edma: clear events in edma_start()Brian Niebuhr1-1/+2
This patch fixes an issue where a DMA channel can erroneously process an event generated by a previous transfer. A failure case is where DMA is being used for SPI transmit and receive channels on OMAP L138. In this case there is a single bit that controls all event generation from the SPI peripheral. Therefore it is possible that between when edma_stop() has been called for the transmit channel on a previous transfer and edma_start() is called for the transmit channel on a subsequent transfer, that a transmit event has been generated. The fix is to clear events in edma_start(). This prevents false events from being processed when events are enabled for that channel. Signed-off-by: Brian Niebuhr <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2010-04-05davinci: da8xx/omap-l1: fix build error when CONFIG_DAVINCI_MUX is undefinedSekhar Nori1-0/+4
The da8xx/omap-l1 boards refuse to build when CONFIG_DAVINCI_MUX is undefined because arch/arm/mach-davinci/mux.c:da8xx_pinmux_setup() is not defined. This patch fixes this issue. This is build tested with davinci_all_defconfig and da8xx_omapl_defconfig and boot tested on DA830 EVM. Reported-by: Shanmuga Sundaram Mahendran <[email protected]> Signed-off-by: Sekhar Nori <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
2010-04-05davinci: timers: don't enable timer until clocksource is initializedKevin Hilman1-2/+4
On da830, when the same timer is used for clocksource and clockevent, the timer can be started before the clockevent is registered/initialzed. This creates a window where a timer interrupt might fire before the clockevent handler has been setup and causes a crash. This patch moves the actual enable/start of the timer after the clockevent has ben registered. Signed-off-by: Kevin Hilman <[email protected]>
2010-04-05ALSA: hda - Fix a wrong array range check in patch_realtek.cTakashi Iwai1-4/+3
The commit 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 introduced a wrong comparision for the array range check, which effectively skips the whole initialization of DAC connections. Fixed now. Reference: bko#15689 https://bugzilla.kernel.org/show_bug.cgi?id=15689 Reported-by: Adrian Ulrich <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-04-05Merge branch 'for-linus' of ↵Linus Torvalds9-13/+78
git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: saving negative to unsigned char 9p: return on mutex_lock_interruptible() 9p: Creating files with names too long should fail with ENAMETOOLONG. 9p: Make sure we are able to clunk the cached fid on umount 9p: drop nlink remove fs/9p: Clunk the fid resulting from partial walk of the name 9p: documentation update 9p: Fix setting of protocol flags in v9fs_session_info structure.
2010-04-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstableLinus Torvalds12-204/+90
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: add check for changed leaves in setup_leaf_for_split Btrfs: create snapshot references in same commit as snapshot Btrfs: fix small race with delalloc flushing waitqueue's Btrfs: use add_to_page_cache_lru, use __page_cache_alloc Btrfs: fix chunk allocate size calculation Btrfs: kill max_extent mount option Btrfs: fail to mount if we have problems reading the block groups Btrfs: check btrfs_get_extent return for IS_ERR() Btrfs: handle kmalloc() failure in inode lookup ioctl Btrfs: dereferencing freed memory Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree() Btrfs: Remove unnecessary finish_wait() in wait_current_trans() Btrfs: add NULL check for do_walk_down() Btrfs: remove duplicate include in ioctl.c Fix trivial conflict in fs/btrfs/compression.c due to slab.h include cleanups.
2010-04-05audit: preface audit printk with auditEric Paris1-1/+1
There have been a number of reports of people seeing the message: "name_count maxed, losing inode data: dev=00:05, inode=3185" in dmesg. These usually lead to people reporting problems to the filesystem group who are in turn clueless what they mean. Eventually someone finds me and I explain what is going on and that these come from the audit system. The basics of the problem is that the audit subsystem never expects a single syscall to 'interact' (for some wish washy meaning of interact) with more than 20 inodes. But in fact some operations like loading kernel modules can cause changes to lots of inodes in debugfs. There are a couple real fixes being bandied about including removing the fixed compile time limit of 20 or not auditing changes in debugfs (or both) but neither are small and obvious so I am not sending them for immediate inclusion (I hope Al forwards a real solution next devel window). In the meantime this patch simply adds 'audit' to the beginning of the crap message so if a user sees it, they come blame me first and we can talk about what it means and make sure we understand all of the reasons it can happen and make sure this gets solved correctly in the long run. Signed-off-by: Eric Paris <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-04-059p: saving negative to unsigned charDan Carpenter1-2/+3
Saving -EINVAL as unsigned char truncates the high bits and changes it into 234 instead of -22. This breaks the test for "if (ret == -EINVAL)" in parse_opts(). Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
2010-04-059p: return on mutex_lock_interruptible()Dan Carpenter1-0/+2
If "err" is -EINTR here the original code calls mutex_unlock() and then returns, but it should just return directly. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]> ------------------------------------------------------------------------------ Download Intel&#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
2010-04-05Btrfs: add check for changed leaves in setup_leaf_for_splitChris Mason1-0/+4
setup_leaf_for_split needs to drop the path and search again, and has checks to see if the item we want to split changed size. But, it misses the case where the leaf changed and now has enough room for the item we want to insert. This adds an extra check to make sure the leaf really needs splitting before we call btrfs_split_leaf(), which keeps us from trying to split a leaf with a single item. btrfs_split_leaf() will blindly split the single item leaf, leaving us with one good leaf and one empty leaf and then a crash. Signed-off-by: Chris Mason <[email protected]>
2010-04-05Btrfs: create snapshot references in same commit as snapshotSage Weil1-66/+31
This creates the reference to a new snapshot in the same commit as the snapshot itself. This avoids the need for a second commit in order for a snapshot to be persistent, and also avoids the problem of "leaking" a new snapshot tree root if the host crashes before the second commit takes place. It is not at all clear to me why it wasn't always done this way. If there is still a reason for the two-stage {create,finish}_pending_snapshots() approach I'm missing something! :) I've been running this for a couple weeks under pretty heavy usage (a few snapshots per minute) without obvious problems. Signed-off-by: Sage Weil <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2010-04-05Btrfs: fix small race with delalloc flushing waitqueue'sJosef Bacik1-5/+4
Everytime we start a new flushing thread, we init the waitqueue if there isn't a flushing thread running. The problem with this is we check space_info->flushing, which we clear right before doing a wake_up on the flushing waitqueue, which causes problems if we init the waitqueue in the middle of clearing the flushing flagh and calling wake_up. This is hard to hit, but the code is wrong anyway, so init the flushing/allocating waitqueue when creating the space info and let it be. I haven't seen the panic since I've been using this patch. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2010-04-05Btrfs: use add_to_page_cache_lru, use __page_cache_allocNick Piggin2-32/+5
Pagecache pages should be allocated with __page_cache_alloc, so they obey pagecache memory policies. add_to_page_cache_lru is exported, so it should be used. Benefits over using a private pagevec: neater code, 128 bytes fewer stack used, percpu lru ordering is preserved, and finally don't need to flush pagevec before returning so batching may be shared with other LRU insertions. Signed-off-by: Nick Piggin <[email protected]>: Signed-off-by: Chris Mason <[email protected]>