commit 7704a8b6fc4a8f51599eb2af4dcf1e2ac9c7e576 Merge: adefe11... ef8ece5... Author: Linus Torvalds Date: Tue Feb 26 07:55:29 2008 -0800 Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6 * 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: [XFS] Undo bit ops cleanup mod due to regression on 32-bit powermac [XFS] Undo bit ops cleanup mod due to regression on 32-bit powermac Remove empty file fs/xfs/Makefile-linux-2.6. commit adefe11c5383face09068176af7dd4e3a80d8f6b Merge: 3d6ce33... 5606bf5... Author: Linus Torvalds Date: Tue Feb 26 07:50:16 2008 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: add missing ext4_journal_stop() ext4: ext4_find_next_zero_bit needs an aligned address on some arch ext4: set EXT4_EXTENTS_FL only for directory and regular files ext4: Don't mark filesystem error if fallocate fails ext4: Fix BUG when writing to an unitialized extent ext4: Don't use ext4_dec_count() if not needed ext4: modify block allocation algorithm for the last group ext4: Don't claim block from group which has corrupt bitmap ext4: Get journal write access before modifying the extent tree ext4: Fix memory and buffer head leak in callers to ext4_ext_find_extent() ext4: Don't leave behind a half-created inode if ext4_mkdir() fails ext4: Fix kernel BUG at fs/ext4/mballoc.c:910! ext4: Fix locking hierarchy violation in ext4_fallocate() Remove incorrect BKL comments in ext4 commit 3d6ce332537ad0a6f77caa469e09d7335187767b Merge: 3fca96e... 72ad6ec... Author: Linus Torvalds Date: Tue Feb 26 07:49:36 2008 -0800 Merge branch 'upstream-linus' of 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: Revert "power_state: get rid of write-only variable in SATA" make atapi_dmadir static commit 3fca96eed1cc9fb524aec536bba8ae921563f1bb Merge: 98c1fc9... 1481197... Author: Linus Torvalds Date: Tue Feb 26 07:49:15 2008 -0800 Merge branch 'v2.6.25-rc3-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep * 'v2.6.25-rc3-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep: Subject: lockdep: include all lock classes in all_lock_classes lockdep: increase MAX_LOCK_DEPTH commit 98c1fc934c097d84dc30c639e9bdb0b992ef53e2 Merge: 7c811e4... fae6031... Author: Linus Torvalds Date: Tue Feb 26 07:48:27 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: fix NULL pointer deref. and resource leak Documentation: correction to debugging-via-ohci1394 ieee1394: sbp2: fix rescan-scsi-bus firewire: fw-sbp2: fix NULL pointer deref. in scsi_remove_device firewire: fw-sbp2: fix NULL pointer deref. in slave_alloc firewire: fw-sbp2: (try to) avoid I/O errors during reconnect firewire: fw-sbp2: enforce a retry of __scsi_add_device if bus generation changed firewire: fw-sbp2: sort includes firewire: fw-sbp2: logout and login after failed reconnect firewire: fw-sbp2: don't add scsi_device twice firewire: fw-sbp2: log bus_id at management request failures firewire: fw-sbp2: wait for completion of fetch agent reset ieee1394: sbp2: add INQUIRY delay workaround firewire: fw-sbp2: add INQUIRY delay workaround firewire: log GUID of new devices firewire: fw-sbp2: don't retry login or reconnect after unplug firewire: fix "kobject_add failed for fw* with -EEXIST" firewire: fw-sbp2: fix logout before login retry firewire: fw-sbp2: unsigned int vs. unsigned commit 7c811e4b6af424c295e3c6438fdc9b647fe6595f Merge: 37c00b8... f18edc9... Author: Linus Torvalds Date: Tue Feb 26 07:44:09 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 * git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (24 commits) x86: no robust/pi futex for real i386 CPUs x86: fix boot failure on 486 due to TSC breakage x86: fix build on non-C locales. x86: make c_idle.work have a static address. x86: don't save unreliable stack trace entries x86: don't make swapper_pg_pmd global x86: don't print a warning when MTRR are blank and running in KVM x86: fix execve with -fstack-protect x86: fix vsyscall wreckage x86: rename KERNEL_TEXT_SIZE => KERNEL_IMAGE_SIZE x86: fix spontaneous reboot with allyesconfig bzImage x86: remove double-checking empty zero pages debug x86: notsc is ignored on common configurations x86/mtrr: fix kernel-doc missing notation x86: handle BIOSes which terminate e820 with CF=1 and no SMAP x86: add comments for NOPs x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC x86: require family >= 6 if we are using P6 NOPs x86: do not promote TM3x00/TM5x00 to i686-class x86: hpet fix docbook comment ... commit 37c00b84d0c1b5c4c65ae837e2235160c03e84c2 Merge: cf3680b... 13d77c3... Author: Linus Torvalds Date: Tue Feb 26 07:43:31 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: latencytop: change /proc task_struct access method latencytop: fix memory leak on latency proc file latencytop: fix kernel panic while reading latency proc file sched: add declaration of sched_tail to sched.h sched: fix signedness warnings in sched.c sched: clean up __pick_last_entity() a bit sched: remove duplicate code from sched_fair.c sched: make early bootup sched_clock() use safer commit cf3680b90c7842cf91ed857ac4528f4e057da366 Author: Tejun Heo Date: Thu Feb 14 10:32:07 2008 +0900 printk: fix possible printk overrun printk recursion detection prepends message to printk_buf and offsets printk_buf when actual message is printed but it forgets to trim buffer length accordingly. This can result in overrun in extreme cases. Fix it. [ mingo@elte.hu: bug was introduced by me via: commit 32a76006683f7b28ae3cc491da37716e002f198e Author: Ingo Molnar Date: Fri Jan 25 21:07:58 2008 +0100 printk: make printk more robust by not allowing recursion ] Signed-off-by: Tejun Heo Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit f18edc95a37a901ffcbe91f5e05105f916a04fae Author: Thomas Gleixner Date: Sat Feb 16 14:05:01 2008 +0100 x86: no robust/pi futex for real i386 CPUs Real i386 CPUs do not have cmpxchg instructions. Catch it before crashing on an invalid opcode. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 12c247a6719987aad65f83158d2bb3e73c75c1f5 Author: Mikael Pettersson Date: Sun Feb 24 18:27:03 2008 +0100 x86: fix boot failure on 486 due to TSC breakage > Diffing dmesg between git7 and git8 doesn't sched any light since > git8 also removed the printouts of the x86 caps as they were being > initialised and updated. I'm currently adding those printouts back > in the hope of seeing where and when the caps get broken. That turned out to be very illuminating: --- dmesg-2.6.24-git7 2008-02-24 18:01:25.295851000 +0100 +++ dmesg-2.6.24-git8 2008-02-24 18:01:25.530358000 +0100 ... CPU: After generic identify, caps: 00000003 00000000 00000000 00000000 00000000 00000000 00000000 00000000 CPU: After all inits, caps: 00000003 00000000 00000000 00000000 00000000 00000000 00000000 00000000 +CPU: After applying cleared_cpu_caps, caps: 00000013 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Notice how the TSC cap bit goes from Off to On. (The first two lines are printout loops from -git7 forward-ported to -git8, the third line is the same printout loop added just after the xor-with-cleared_cpu_caps[] loop.) Here's how the breakage occurs: 1. arch/x86/kernel/tsc_32.c:tsc_init() sees !cpu_has_tsc, so bails and calls setup_clear_cpu_cap(X86_FEATURE_TSC). 2. include/asm-x86/cpufeature.h:setup_clear_cpu_cap(bit) clears the bit in boot_cpu_data and sets it in cleared_cpu_caps 3. arch/x86/kernel/cpu/common.c:identify_cpu() XORs all caps in with cleared_cpu_caps HOWEVER, at this point c->x86_capability correctly has TSC Off, cleared_cpu_caps has TSC On, so the XOR incorrectly sets TSC to On in c->x86_capability, with disastrous results. The real bug is that clearing bits with XOR only works if the bits are known to be 1 prior to the XOR, and that's not true here. A simple fix is to convert the XOR to AND-NOT instead. The following patch does that, and allows my 486 to boot 2.6.25-rc kernels again. [ mingo@elte.hu: fixed a similar bug in setup_64.c as well. ] The breakage was introduced via commit 7d851c8d3db0. Signed-off-by: Mikael Pettersson Signed-off-by: Ingo Molnar commit 03994f01e8b72b3d01fd3d09d1cc7c9f421a727c Author: Priit Laes Date: Sun Feb 24 18:36:05 2008 +0200 x86: fix build on non-C locales. For some locales regex range [a-zA-Z] does not work as it is supposed to. so we have to use [:alnum:] and [:xdigit:] to make it work as intended. [1] http://en.wikipedia.org/wiki/Estonian_alphabet Signed-off-by: Ingo Molnar commit 2b775a27c0d9fdf8078d5b31e1e27411e5bf2a91 Author: Glauber Costa Date: Fri Feb 22 12:09:29 2008 -0300 x86: make c_idle.work have a static address. Currently, c_idle is declared in the stack, and thus, have no static address. Peter Zijlstra points out this simple solution, in which c_idle.work is initializated separatedly. Note that the INIT_WORK macro has a static declaration of a key inside. Signed-off-by: Glauber Costa Acked-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 1650743cdc0db73478f72c57544ce79ea8f3dda6 Author: Vegard Nossum Date: Fri Feb 22 19:23:58 2008 +0100 x86: don't save unreliable stack trace entries Currently, there is no way for print_stack_trace() to determine whether a given stack trace entry was deemed reliable or not, simply because save_stack_trace() does not record this information. (Perhaps needless to say, this makes the saved stack traces A LOT harder to read, and probably with no other benefits, since debugging features that use save_stack_trace() most likely also require frame pointers, etc.) This patch reverts to the old behaviour of only recording the reliable trace entries for saved stack traces. Signed-off-by: Vegard Nossum Acked-by: Arjan van de Ven Signed-off-by: Ingo Molnar commit ed2b7e2b1d1ae201afe8fbd111632074b7b53ed4 Author: Adrian Bunk Date: Fri Feb 22 21:58:37 2008 +0200 x86: don't make swapper_pg_pmd global There doesn't seem to be any reason for swapper_pg_pmd being global. Signed-off-by: Adrian Bunk Signed-off-by: Ingo Molnar commit 4147c8747eace9058c606b35e700060297edaf91 Author: Joerg Roedel Date: Thu Feb 21 15:50:14 2008 +0100 x86: don't print a warning when MTRR are blank and running in KVM Inside a KVM virtual machine the MTRRs are usually blank. This confuses Linux and causes a warning message at boot. This patch removes that warning message when running Linux as a KVM guest. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar commit 5d119b2c9a490e2d647eae134211b32a18a04c7d Author: Ingo Molnar Date: Tue Feb 26 12:55:57 2008 +0100 x86: fix execve with -fstack-protect pointed out by pageexec@freemail.hu: > what happens here is that gcc treats the argument area as owned by the > callee, not the caller and is allowed to do certain tricks. for ssp it > will make a copy of the struct passed by value into the local variable > area and pass *its* address down, and it won't copy it back into the > original instance stored in the argument area. > > so once sys_execve returns, the pt_regs passed by value hasn't at all > changed and its default content will cause a nice double fault (FWIW, > this part took me the longest to debug, being down with cold didn't > help it either ;). To fix this we pass in pt_regs by pointer. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit ce28b9864b853803320c3f1d8de1b81aa4120b14 Author: Thomas Gleixner Date: Wed Feb 20 23:57:30 2008 +0100 x86: fix vsyscall wreckage based on a report from Arne Georg Gleditsch about user-space apps misbehaving after toggling /proc/sys/kernel/vsyscall64, a review of the code revealed that the "NOP patching" done there is fundamentally unsafe for a number of reasons: 1) the patching code runs without synchronizing other CPUs 2) it inserts NOPs even if there is no clock source which provides vread 3) when the clock source changes to one without vread we run in exactly the same problem as in #2 4) if nobody toggles the proc entry from 1 to 0 and to 1 again, then the syscall is not patched out as a result it is possible to break user-space via this patching. The only safe thing for now is to remove the patching. This code was broken since v2.6.21. Reported-by: Arne Georg Gleditsch Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit d4afe414189b098d56bcd24280c018aa2ac9a990 Author: Ingo Molnar Date: Thu Feb 21 13:39:30 2008 +0100 x86: rename KERNEL_TEXT_SIZE => KERNEL_IMAGE_SIZE The KERNEL_TEXT_SIZE constant was mis-named, as we not only map the kernel text but data, bss and init sections as well. That name led me on the wrong path with the KERNEL_TEXT_SIZE regression, because i knew how big of _text_ my images have and i knew about the 40 MB "text" limit so i wrongly thought to be on the safe side of the 40 MB limit with my 29 MB of text, while the total image size was slightly above 40 MB. Signed-off-by: Ingo Molnar commit 88f3aec7afd9ae3e6f6d221801996b69aad1e3a4 Author: Ingo Molnar Date: Thu Feb 21 11:04:11 2008 +0100 x86: fix spontaneous reboot with allyesconfig bzImage recently the 64-bit allyesconfig bzImage kernel started spontaneously rebooting during early bootup. after a few fun hours spent with early init debugging, it turns out that we've got this rather annoying limit on the size of the kernel image: #define KERNEL_TEXT_SIZE (40*1024*1024) which limit my vmlinux just happened to pass: text data bss dec hex filename 29703744 4222751 8646224 42572719 2899baf vmlinux 40 MB is 42572719 bytes, so my vmlinux was just 1.5% above this limit :-/ So it happily crashed right in head_64.S, which - as we all know - is the most debuggable code in the whole architecture ;-) So increase the limit to allow an up to 128MB kernel image to be mapped. (should anyone be that crazy or lazy) We have a full 4K of pagetable (level2_kernel_pgt) allocated for these mappings already, so there's no RAM overhead and the limit was rather pointless and arbitrary. Signed-off-by: Ingo Molnar commit 3b57bc461fd5019aef4cfc77d4faf56ebe95449c Author: Yinghai Lu Date: Wed Feb 20 18:53:17 2008 -0800 x86: remove double-checking empty zero pages debug so far no one complained about that. Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar commit 7265b6f10deba1cbe071cee646b063bda07ecd68 Author: Pavel Machek Date: Tue Feb 19 11:02:30 2008 +0100 x86: notsc is ignored on common configurations notsc is ignored in 32-bit kernels if CONFIG_X86_TSC is on.. which is bad, fix it. Signed-off-by: Pavel Machek Signed-off-by: Ingo Molnar commit f5106d91f2bf9153d6420f9ebb8114f73f9ce66a Author: Randy Dunlap Date: Mon Feb 18 13:10:44 2008 -0800 x86/mtrr: fix kernel-doc missing notation Fix mtrr kernel-doc warning: Warning(linux-2.6.24-git12//arch/x86/kernel/cpu/mtrr/main.c:677): No description found for parameter 'end_pfn' Signed-off-by: Randy Dunlap Signed-off-by: Ingo Molnar commit 829157be590af1c2555fb74c3c4db3327e3201fc Author: H. Peter Anvin Date: Wed Feb 13 11:16:46 2008 -0800 x86: handle BIOSes which terminate e820 with CF=1 and no SMAP The proper way to terminate the e820 chain is with %ebx == 0 on the last legitimate memory block. However, several BIOSes don't do that and instead return error (CF = 1) when trying to read off the end of the list. For this error return, %eax doesn't necessarily return the SMAP signature -- correctly so, since %ah should contain an error code in this case. To deal with some particularly broken BIOSes, we clear the entire e820 chain if the SMAP signature is missing in the middle, indicating a plain insane e820 implementation. However, we need to make the test for CF = 1 before the SMAP check. This fixes at least one HP laptop (nc6400) for which none of the memory-probing methods (e820, e801, 88) functioned fully according to spec. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 4cd20952d74323df06e438c0c3273b5be89d6bfd Author: H. Peter Anvin Date: Mon Feb 18 23:24:33 2008 -0800 x86: add comments for NOPs Add comments describing the various NOP sequences. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 959b3be64cab9160cd74532a49b89cdd918d38e9 Author: H. Peter Anvin Date: Thu Feb 14 14:56:45 2008 -0800 x86: don't use P6_NOPs if compiling with CONFIG_X86_GENERIC P6_NOPs are definitely not supported on some VIA CPUs, and possibly (unverified) on AMD K7s. It is also the only thing that prevents a 686 kernel from running on Transmeta TM3x00/5x00 (Crusoe) series. The performance benefit over generic NOPs is very small, so when building for generic consumption, avoid using them. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 7343b3b3a627eb30e24e921f004f659c8ebb91c5 Author: H. Peter Anvin Date: Thu Feb 14 14:52:05 2008 -0800 x86: require family >= 6 if we are using P6 NOPs The P6 family of NOPs are only available on family >= 6 or above, so enforce that in the boot code. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit a7ef94e6889186848573a10c5bdb8271405f44de Author: H. Peter Anvin Date: Thu Feb 14 14:51:00 2008 -0800 x86: do not promote TM3x00/TM5x00 to i686-class We have been promoting Transmeta TM3x00/TM5x00 chips to i686-class based on the notion that they contain all the user-space visible features of an i686-class chip. However, this is not actually true: they lack the EA-taking long NOPs (0F 1F /0). Since this is a userspace-visible incompatibility, downgrade these CPUs to the manufacturer-defined i586 level. Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit b02a7f22f39f02fdf5a1380ff700293639db4490 Author: Pavel Machek Date: Tue Feb 5 00:48:13 2008 +0100 x86: hpet fix docbook comment Signed-off-by: Pavel Machek Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 92cb54a37a42a41cfb2ef7f1478bfa4395198258 Author: Ingo Molnar Date: Wed Feb 13 14:37:52 2008 +0100 x86: make DEBUG_PAGEALLOC and CPA more robust Use PF_MEMALLOC to prevent recursive calls in the DBEUG_PAGEALLOC case. This makes the code simpler and more robust against allocation failures. This fixes the following fallback to non-mmconfig: http://lkml.org/lkml/2008/2/20/551 http://bugzilla.kernel.org/show_bug.cgi?id=10083 Also, for DEBUG_PAGEALLOC=n reduce the pool size to one page. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit 1ce70c4fac3c3954bd48c035f448793867592bc0 Author: Ahmed S. Darwish Date: Sun Feb 24 17:55:15 2008 +0200 x86/lguest: fix pgdir pmd index calculation Hi all, Beginning from commits close to v2.6.25-rc2, running lguest always oopses the host kernel. Oops is at [1]. Bisection led to the following commit: commit 37cc8d7f963ba2deec29c9b68716944516a3244f x86/early_ioremap: don't assume we're using swapper_pg_dir At the early stages of boot, before the kernel pagetable has been fully initialized, a Xen kernel will still be running off the Xen-provided pagetables rather than swapper_pg_dir[]. Therefore, readback cr3 to determine the base of the pagetable rather than assuming swapper_pg_dir[]. static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) { - pgd_t *pgd = &swapper_pg_dir[pgd_index(addr)]; + /* Don't assume we're using swapper_pg_dir at this point */ + pgd_t *base = __va(read_cr3()); + pgd_t *pgd = &base[pgd_index(addr)]; pud_t *pud = pud_offset(pgd, addr); pmd_t *pmd = pmd_offset(pud, addr); Trying to analyze the problem, it seems on the guest side of lguest, %cr3 has a different value from &swapper_pg-dir (which is AFAIK fine on a pravirt guest): Putting some debugging messages in early_ioremap_pmd: /* Appears 3 times */ [ 0.000000] *************************** [ 0.000000] __va(%cr3) = c0000000, &swapper_pg_dir = c02cc000 [ 0.000000] *************************** After 8 hours of debugging and staring on lguest code, I noticed something strange in paravirt_ops->set_pmd hypercall invocation: static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) { *pmdp = pmdval; lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK, (__pa(pmdp)&(PAGE_SIZE-1))/4, 0); } The first hcall parameter is global pgdir which looks fine. The second parameter is the pmd index in the pgdir which is suspectful. AFAIK, calculating the index of pmd does not need a divisoin over four. Removing the division made lguest work fine again . Patch is at [2]. I am not sure why the division over four existed in the first place. It seems bogus, maybe the Xen patch just made the problem appear ? [2]: The patch: [PATCH] lguest: fix pgdir pmd index cacluation Remove an error in index calculation which leads to removing a not existing shadow page table (leading to a Null dereference). Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar commit db342d216ba9e060d8c5501eefc1d0a789c9e711 Author: Tony Breeds Date: Tue Feb 19 08:16:03 2008 +0100 lguest: fix build breakage [ mingo@elte.hu: merged to Rusty's patch ] Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit cbc34973709eb41b369c304c075cf2069f847012 Author: Harvey Harrison Date: Wed Feb 13 13:14:35 2008 -0800 lguest: include function prototypes Added a declaration to asm-x86/lguest.h and moved the extern arrays there as well. As an alternative to including asm/lguest.h directly, an include could be put in linux/lguest.h Signed-off-by: Harvey Harrison Cc: "rusty@rustcorp.com.au" Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit ef8ece55d9b6825c28a5c1a4bd89b94040cb7b32 Author: Lachlan McIlroy Date: Tue Feb 26 17:00:22 2008 +1100 [XFS] Undo bit ops cleanup mod due to regression on 32-bit powermac platform. SGI-PV: 971186 SGI-Modid: xfs-linux-melb:xfs-kern:30559a Signed-off-by: Lachlan McIlroy commit db69c915e67705daac25cad06d816c09be634de0 Author: Lachlan McIlroy Date: Tue Feb 26 17:00:14 2008 +1100 [XFS] Undo bit ops cleanup mod due to regression on 32-bit powermac platform. SGI-PV: 974005 SGI-Modid: xfs-linux-melb:xfs-kern:30558a Signed-off-by: Lachlan McIlroy commit 91e229bbad6524aabaac8717b2f559283670c37a Merge: 6e5e934... bfa274e... Author: Lachlan McIlroy Date: Tue Feb 26 14:26:14 2008 +1100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus commit 72ad6ec48989d4b5477128e739b960be11155036 Author: Jeff Garzik Date: Mon Feb 25 17:31:10 2008 -0500 Revert "power_state: get rid of write-only variable in SATA" This reverts commit 559bbe6cbd0d8c68d40076a5f7dc98e3bf5864b2. Michael S. Tsirkin reports that this changes breaks suspend/resume. Signed-off-by: Jeff Garzik commit c5c61bda5ecceaa0f16d326cd2c2147468a4c443 Author: Adrian Bunk Date: Mon Feb 25 02:07:25 2008 +0200 make atapi_dmadir static atapi_dmadir can now become static. Signed-off-by: Adrian Bunk Signed-off-by: Jeff Garzik commit 1481197b50114d7212d659d41cb97f31a8934883 Author: Dale Farnsworth Date: Mon Feb 25 23:03:02 2008 +0100 Subject: lockdep: include all lock classes in all_lock_classes Add each lock class to the all_lock_classes list when it is first registered. Previously, lock classes were added to all_lock_classes when the lock class was first used. Since one of the uses of the list is to find unused locks, this didn't work well. Signed-off-by: Dale Farnsworth Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit bdb9441e9c325d50b5ae17f7d3205d65b8ed2e5f Author: Peter Zijlstra Date: Mon Feb 25 23:02:48 2008 +0100 lockdep: increase MAX_LOCK_DEPTH Some code paths exceed the current max lock depth (XFS), so increase this limit a bit. I looked at making this a dynamic allocated array, but we should not advocate insane lock depths, so stay with this as long as it works... Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 5606bf5d0cbfbc3dfa78793a3793c43dd045fb1b Author: Akinobu Mita Date: Mon Feb 25 15:37:42 2008 -0500 ext4: add missing ext4_journal_stop() Add missing ext4_journal_stop() in error handling. Signed-off-by: Akinobu Mita Signed-off-by: "Theodore Ts'o" Cc: Stephen Tweedie Cc: adilger@clusterfs.com Cc: Andrew Morton Cc: Mingming Cao commit 13d77c37cab2bb906022309e1e7182c327e49916 Author: Hiroshi Shimamoto Date: Wed Feb 20 16:53:29 2008 -0800 latencytop: change /proc task_struct access method Change getting task_struct by get_proc_task() at read or write time, and returns -ESRCH if get_proc_task() returns NULL. This is same behavior as other /proc files. Signed-off-by: Hiroshi Shimamoto Signed-off-by: Ingo Molnar commit d6643d12cb0885d06a1491b16c1476abcbd53d40 Author: Hiroshi Shimamoto Date: Thu Feb 14 10:27:00 2008 -0800 latencytop: fix memory leak on latency proc file At lstats_open(), calling get_proc_task() gets task struct, but it never put. put_task_struct() should be called when releasing. Signed-off-by: Hiroshi Shimamoto Signed-off-by: Ingo Molnar commit ae0027869db7d28563cd783865fab04ffd18419c Author: Hiroshi Shimamoto Date: Thu Feb 14 10:26:24 2008 -0800 latencytop: fix kernel panic while reading latency proc file Reading /proc//latency or /proc//task//latency could cause NULL pointer dereference. In lstats_open(), get_proc_task() can return NULL, in which case the kernel will oops at lstats_show_proc() because m->private is NULL. When get_proc_task() returns NULL, the kernel should return -ENOENT. This can be reproduced by the following script. while : do date bash -c 'ls > ls.$$' & pid=$! cat /proc/$pid/latency & cat /proc/$pid/latency & cat /proc/$pid/latency & cat /proc/$pid/latency done Signed-off-by: Hiroshi Shimamoto Signed-off-by: Ingo Molnar commit 2d07b255c7b8a9723010e5c74778e058dc05162e Author: Harvey Harrison Date: Fri Feb 15 09:56:34 2008 -0800 sched: add declaration of sched_tail to sched.h Avoids sparse warnings: kernel/sched.c:2170:17: warning: symbol 'schedule_tail' was not declared. Should it be static? Avoids the need for an external declaration in arch/um/process.c Signed-off-by: Harvey Harrison Signed-off-by: Ingo Molnar commit 67ca7bde2e9d3516b5ae0188330ad1059ac03f38 Author: Harvey Harrison Date: Fri Feb 15 09:56:36 2008 -0800 sched: fix signedness warnings in sched.c Unsigned long values are always assigned to switch_count, make it unsigned long. kernel/sched.c:3897:15: warning: incorrect type in assignment (different signedness) kernel/sched.c:3897:15: expected long *switch_count kernel/sched.c:3897:15: got unsigned long * kernel/sched.c:3921:16: warning: incorrect type in assignment (different signedness) kernel/sched.c:3921:16: expected long *switch_count kernel/sched.c:3921:16: got unsigned long * Signed-off-by: Harvey Harrison Signed-off-by: Ingo Molnar commit 7eee3e677d6e2e9007afcd7d79b0715525aa552e Author: Ingo Molnar Date: Fri Feb 22 10:32:21 2008 +0100 sched: clean up __pick_last_entity() a bit Signed-off-by: Ingo Molnar commit 70eee74b70c1a8485ec5f2bafa13dbc66fab6e02 Author: Balbir Singh Date: Fri Feb 22 13:25:53 2008 +0530 sched: remove duplicate code from sched_fair.c pick_task_entity() duplicates existing code. This functionality can be easily obtained using rb_last(). Avoid code duplication by using rb_last(). Signed-off-by: Balbir Singh Signed-off-by: Ingo Molnar commit 6892b75e60557a48c01d57ba320419a9e2ce9846 Author: Ingo Molnar Date: Wed Feb 13 14:02:36 2008 +0100 sched: make early bootup sched_clock() use safer do not call sched_clock() too early. Not only might rq->idle not be set up - but pure per-cpu data might not be accessible either. this solves an ia64 early bootup hang with CONFIG_PRINTK_TIME=y. Tested-by: Tony Luck Acked-by: Tony Luck Acked-by: David S. Miller Signed-off-by: Ingo Molnar commit ffad0a44b7216d0f079dcf95a351082099d1e5fb Author: Aneesh Kumar K.V Date: Sat Feb 23 01:38:34 2008 -0500 ext4: ext4_find_next_zero_bit needs an aligned address on some arch ext4_find_next_zero_bit and ext4_find_next_bit needs a long aligned address on x8_64. Add mb_find_next_zero_bit and mb_find_next_bit and use them in the mballoc. Fix: https://bugzilla.redhat.com/show_bug.cgi?id=433286 Eric Sandeen debugged the problem and suggested the fix. Signed-off-by: Aneesh Kumar K.V Acked-by: Eric Sandeen Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 42bf0383d1e09dd1b38f3debb13a76b2f87634b3 Author: Aneesh Kumar K.V Date: Mon Feb 25 16:38:03 2008 -0500 ext4: set EXT4_EXTENTS_FL only for directory and regular files In addition, don't inherit EXT4_EXTENTS_FL from parent directory. If we have a directory with extent flag set and later mount the file system with -o noextents, the files created in that directory will also have extent flag set but we would not have called ext4_ext_tree_init for them. This will cause error later when we are verifying the extent header Signed-off-by: Aneesh Kumar K.V Acked-off-by: Eric Sandeen Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 2c98615d3b64ce7888cd46cc668023f456daf287 Author: Aneesh Kumar K.V Date: Mon Feb 25 15:41:35 2008 -0500 ext4: Don't mark filesystem error if fallocate fails If we fail to allocate blocks don't call ext4_error. Also don't hide errors from ext4_get_blocks_wrap Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" commit f5ab0d1f8f7df937778c60c3da6f4ef939a54a7b Author: Mingming Cao Date: Mon Feb 25 15:29:55 2008 -0500 ext4: Fix BUG when writing to an unitialized extent This patch fixes a bug when writing to preallocated but uninitialized blocks, which resulted in a BUG in fs/buffer.c saying that the buffer is not mapped. When writing to a file, ext4_get_block_wrap() is called with create=1 in order to request that blocks be allocated if necessary. It currently calls ext4_get_blocks() with create=0 in order to do a lookup first. If the inode contains an unitialized data block, the buffer head is left unampped, which ext4_get_blocks_wrap() returns, causing the BUG. We fix this by checking to see if the buffer head is unmapped, and if so, we make sure the the buffer head is mapped by calling ext4_ext_get_blocks with create=1. Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 6e5e93424dc66542c548dfaa3bfebe30d46d50dd Author: Lachlan McIlroy Date: Fri Feb 22 15:36:19 2008 +1100 Remove empty file fs/xfs/Makefile-linux-2.6. commit fae603121428ba83b7343c88e68a7144525ab3eb Author: Stefan Richter Date: Wed Feb 20 21:10:06 2008 +0100 firewire: fix NULL pointer deref. and resource leak By supplying ioctl()s in the wrong order, a userspace client was able to trigger NULL pointer dereferences. Furthermore, by calling ioctl_create_iso_context more than once, new contexts could be created without ever freeing the previously created contexts. Thanks to Anders Blomdell for the report. Signed-off-by: Stefan Richter commit 09d7328e62e3b4cefe4bf3eeeeacb54f62a7ae5c Author: Stefan Richter Date: Mon Feb 18 21:38:35 2008 +0100 Documentation: correction to debugging-via-ohci1394 Rectify a factoid about firewire-ohci. Acked-by: Ingo Molnar Also fix a typo spotted by Bernhard Kaindl. Signed-off-by: Stefan Richter commit ef774c16a744f130f27c654bf9c4806e767fc773 Author: Stefan Richter Date: Sun Feb 17 14:57:10 2008 +0100 ieee1394: sbp2: fix rescan-scsi-bus rescan-scsi-bus used to add SBP-2 targets which weren't there. Signed-off-by: Stefan Richter commit 33f1c6c3529f5f279e2e98e5cca0c5bac152153b Author: Stefan Richter Date: Tue Feb 19 09:05:49 2008 +0100 firewire: fw-sbp2: fix NULL pointer deref. in scsi_remove_device Fix a kernel bug when unplugging an SBP-2 device after having its scsi_device already removed via the "delete" sysfs attribute. Signed-off-by: Stefan Richter commit 5513c5f6f9bd8c8ad3727130910fa288c62526a7 Author: Stefan Richter Date: Sun Feb 17 14:56:19 2008 +0100 firewire: fw-sbp2: fix NULL pointer deref. in slave_alloc Fix a kernel bug when running rescan-scsi-bus while a FireWire disk is connected: http://bugzilla.kernel.org/show_bug.cgi?id=10008 Signed-off-by: Stefan Richter commit 2e2705bdcb959372d54bf7f79dd9a555ec2adfb4 Author: Stefan Richter Date: Sat Feb 16 16:37:28 2008 +0100 firewire: fw-sbp2: (try to) avoid I/O errors during reconnect While fw-sbp2 takes the necessary time to reconnect to a logical unit after bus reset, the SCSI core keeps sending new commands. They are all immediately completed with host busy status, and application clients or filesystems will break quickly. The SCSI device might even be taken offline: http://bugzilla.kernel.org/show_bug.cgi?id=9734 The only remedy seems to be to block the SCSI device until reconnect. Alas the SCSI core has no useful API to block only one logical unit i.e. the scsi_device, therefore we block the entire Scsi_Host. This currently corresponds to an SBP-2 target. In case of targets with multiple logical units, we need to satisfy the dependencies between logical units by carefully tracking the blocking state of the target and its units. We block all logical units of a target as soon as one of them needs to be blocked, and keep them blocked until all of them are ready to be unblocked. Furthermore, as the history of the old sbp2 driver has shown, the scsi_block_requests() API is a minefield with high potential of deadlocks. We therefore take extra measures to keep logical units unblocked during __scsi_add_device() and during shutdown. This avoids I/O errors during reconnect in many but alas not in all cases. There may still be errors after a re-login had to be performed. Also, some bridges have been seen to cease fetching management ORBs if I/O went on up until a bus reset. In these cases, all management ORBs time out after mgt_orb_timeout. The old sbp2 driver is less vulnerable or maybe not vulnerable to this, for as yet unknown reasons. Signed-off-by: Stefan Richter commit e80de3704ac30ddb7f9a12447a2ecee32ccd7880 Author: Stefan Richter Date: Fri Feb 15 21:29:02 2008 +0100 firewire: fw-sbp2: enforce a retry of __scsi_add_device if bus generation changed fw-sbp2 is unable to reconnect while performing __scsi_add_device because there is only a single workqueue thread context available for both at the moment. This should be fixed eventually. An actual failure of __scsi_add_device is easy to handle, but an incomplete execution of __scsi_add_device with an sdev returned would remain undetected and leave the SBP-2 target unusable. Therefore we use a workaround: If there was a bus reset during __scsi_add_device (i.e. during the SCSI probe), we remove the new sdev immediately, log out, and attempt login and SCSI probe again. Tested-by: Jarod Wilson (earlier version) Signed-off-by: Stefan Richter commit 7bb6bf7c8ba0b4ccfecaa00d6faea51b0bd42c8c Author: Stefan Richter Date: Sun Feb 3 23:12:17 2008 +0100 firewire: fw-sbp2: sort includes Signed-off-by: Stefan Richter commit ce896d95cc7886ae05859c5b409a7b2f3b606ec1 Author: Stefan Richter Date: Sun Feb 3 23:11:39 2008 +0100 firewire: fw-sbp2: logout and login after failed reconnect If fw-sbp2 was too late with requesting the reconnect, the target would reject this. In this case, log out before attempting the reconnect. Else several firmwares will deny the re-login because they somehow didn't invalidate the old login. Also, don't retry reconnects in this situation. The retries won't succeed either. These changes improve chances for successful re-login and shorten the period during which the logical unit is inaccessible. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit 0fa6dfdb0a2768541e998a5dab10b368de56c60a Author: Stefan Richter Date: Sun Feb 3 23:10:47 2008 +0100 firewire: fw-sbp2: don't add scsi_device twice When a reconnect failed but re-login succeeded, __scsi_add_device was called again. In those cases, __scsi_add_device succeeded and returned the pointer to the existing scsi_device. fw-sbp2 then continued orderly, except that it missed to call sbp2_cancel_orbs. SCSI core would call fw-sbp2's eh_abort_handler eventually if there had been an outstanding command. This patch avoids the needless lookups and temporary allocations in SCSI core and I/O stall and timeout until eh_abort_handler hits. Also, __scsi_add_device tolerating calls for devices which already exist is undocumented behavior on which we shouldn't rely. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit 48f18c761c001a66ef1928b42799c717368b1d64 Author: Stefan Richter Date: Sun Feb 3 23:09:50 2008 +0100 firewire: fw-sbp2: log bus_id at management request failures for easier readable logs if more than one SBP-2 device is present. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit e0e60215552d4d40caf581a8d3247203fe948fe7 Author: Stefan Richter Date: Sun Feb 3 23:08:58 2008 +0100 firewire: fw-sbp2: wait for completion of fetch agent reset Like the old sbp2 driver, wait for the write transaction to the AGENT_RESET to complete before proceeding (after login, after reconnect, or in SCSI error handling). There is one occasion where AGENT_RESET is written to from atomic context when getting DEAD status for a command ORB. There we still continue without waiting for the transaction to complete because this is more difficult to fix... Signed-off-by: Stefan Richter commit d94a983526cb868658c958ab689410dc1c6a31f3 Author: Stefan Richter Date: Sun Feb 3 23:07:44 2008 +0100 ieee1394: sbp2: add INQUIRY delay workaround Add the same workaround as found in fw-sbp2 for feature parity and compatibility of the workarounds module parameter. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit 9220f1946209a5b3335ea2d28f8462695885791b Author: Stefan Richter Date: Sun Feb 3 23:04:38 2008 +0100 firewire: fw-sbp2: add INQUIRY delay workaround Several different SBP-2 bridges accept a login early while the IDE device is still powering up. They are therefore unable to respond to SCSI INQUIRY immediately, and the SCSI core has to retry the INQUIRY. One of these retries is typically successful, and all is well. But in case of Momobay FX-3A, the INQUIRY retries tend to fail entirely. This can usually be avoided by waiting a little while after login before letting the SCSI core send the INQUIRY. The old sbp2 driver handles this more gracefully for as yet unknown reasons (perhaps because it waits for fetch agent resets to complete, unlike fw-sbp2 which quickly proceeds after requesting the agent reset). Therefore the workaround is not as much necessary for sbp2. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit fa6e697b85d705d37b3b03829095c22bcbe95ab6 Author: Stefan Richter Date: Sun Feb 3 23:03:00 2008 +0100 firewire: log GUID of new devices This should help to interpret user reports. E.g. one can look up the vendor OUI (first three bytes of the GUID) and thus tell what is what. Also simplifies the math in the GUID sysfs attribute. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit be6f48b0174584c9c415012ca14803c7e941e27e Author: Stefan Richter Date: Sun Jan 27 19:14:44 2008 +0100 firewire: fw-sbp2: don't retry login or reconnect after unplug If a device is being unplugged while fw-sbp2 had a login or reconnect on schedule, it would take about half a minute to shut the fw_unit down: Jan 27 18:34:54 stein firewire_sbp2: logged in to fw2.0 LUN 0000 (0 retries) Jan 27 18:34:59 stein firewire_sbp2: sbp2_scsi_abort Jan 27 18:34:59 stein scsi 25:0:0:0: Device offlined - not ready after error recovery Jan 27 18:35:01 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:06 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:12 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:17 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:22 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:27 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:32 stein firewire_sbp2: orb reply timed out, rcode=0x11 Jan 27 18:35:32 stein firewire_sbp2: failed to login to fw2.0 LUN 0000 Jan 27 18:35:32 stein firewire_sbp2: released fw2.0 After this patch, typically only a few seconds spent in __scsi_add_device remain: Jan 27 19:05:50 stein firewire_sbp2: logged in to fw2.0 LUN 0000 (0 retries) Jan 27 19:05:56 stein firewire_sbp2: sbp2_scsi_abort Jan 27 19:05:56 stein scsi 33:0:0:0: Device offlined - not ready after error recovery Jan 27 19:05:56 stein firewire_sbp2: released fw2.0 The benefit of this is less noise in the syslog. It furthermore avoids a few wasted CPU cycles and needlessly prolonged lifetime of a few driver objects. Signed-off-by: Stefan Richter Signed-off-by: Jarod Wilson commit 96b19062e741b715cf399312c30e0672d8889569 Author: Stefan Richter Date: Sat Feb 2 15:01:09 2008 +0100 firewire: fix "kobject_add failed for fw* with -EEXIST" There is a race between shutdown and creation of devices: fw-core may attempt to add a device with the same name of an already existing device. http://bugzilla.kernel.org/show_bug.cgi?id=9828 Impact of the bug: Happens rarely (when shutdown of a device coincides with creation of another), forces the user to unplug and replug the new device to get it working. The fix is obvious: Free the minor number *after* instead of *before* device_unregister(). This requires to take an additional reference of the fw_device as long as the IDR tree points to it. And while we are at it, we fix an additional race condition: fw_device_op_open() took its reference of the fw_device a little bit too late, hence was in danger to access an already invalid fw_device. Signed-off-by: Stefan Richter commit 1b9c12ba2fdf802a23630f70eddb0e821296634e Author: Stefan Richter Date: Sat Jan 26 17:43:23 2008 +0100 firewire: fw-sbp2: fix logout before login retry This fixes a "can't recognize device" kind of bug. If the SCSI INQUIRY failed and hence __scsi_add_device failed due to a bus reset, we tried a logout and then waited for the already scheduled login work to happen. So far so good, but the generation used for the logout was outdated, hence the logout never reached the target. The target might therefore deny the subsequent relogin attempt, which would also leave the target inaccessible. Therefore fetch a fresh device->generation for the logout. Use memory barriers to prevent our plan being foiled by compiler or hardware optimizations. Signed-off-by: Stefan Richter commit 05cca7381429e12d66c5b5c8b5c5848055b88bf7 Author: Stefan Richter Date: Sat Jan 26 17:42:45 2008 +0100 firewire: fw-sbp2: unsigned int vs. unsigned Standardize on "unsigned int" style. Sort some struct members thematically. Signed-off-by: Stefan Richter commit 825f1481ead4ce40671089bae7412ac3519e8caa Author: Theodore Ts'o Date: Fri Feb 15 15:00:38 2008 -0500 ext4: Don't use ext4_dec_count() if not needed The ext4_dec_count() function is only needed when dropping the i_nlink count on inodes which are (or which could be) directories. If we *know* that the inode in question can't possibly be a directory, use drop_nlink or clear_nlink() if we know i_nlink is 1. Signed-off-by: "Theodore Ts'o" commit 74d3487fc8aa58cec16dff7239dea1ca59bdab0e Author: Valerie Clement Date: Fri Feb 15 13:43:07 2008 -0500 ext4: modify block allocation algorithm for the last group When a directory inode is allocated in the last group and the last group contains less than s_blocks_per_group blocks, the initial block allocated for the directory is not always allocated in the same group as the directory inode, but in one of the first groups of the filesystem (group 1 for example). Depending on the current process's pid, ext4_find_near() and ext4_ext_find_goal() can return a block number greater than the maximum blocks count in the filesystem and in that case the block will be not allocated in the same group as the inode. The following patch fixes the problem. Should the modification also be done in ext2/3 code? Signed-off-by: Valerie Clement Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit e56eb6590693a5a340e8f596db2768a6e1b9e236 Author: Aneesh Kumar K.V Date: Fri Feb 15 13:48:21 2008 -0500 ext4: Don't claim block from group which has corrupt bitmap In ext4_mb_complex_scan_group, if the extent length of the newly found extentet is greater than than the total free blocks counted in group info, break without claiming the block. Document different ext4_error usage, explaining the state with which we continue if we mount with errors=continue Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 9df5643ad135c7f8c02d3b69020de4ec910f9fc0 Author: Aneesh Kumar K.V Date: Fri Feb 22 06:17:31 2008 -0500 ext4: Get journal write access before modifying the extent tree When the user was writing into an unitialized extent, ext4_ext_convert_to_initialize() was not requesting journal write access before it started to modify the extent tree. Fix this oversight. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit b35905c16ad6428551eb9e49525011bd2700cf56 Author: Aneesh Kumar K.V Date: Mon Feb 25 16:54:37 2008 -0500 ext4: Fix memory and buffer head leak in callers to ext4_ext_find_extent() The path variable returned via ext4_ext_find_extent is a kmalloc variable and needs to be freeded. It also contains a reference to buffer_head which needs to be dropped. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 4cdeed861b5f797b3fa661eb331a6bd6ad669c6a Author: Aneesh Kumar K.V Date: Fri Feb 22 06:17:31 2008 -0500 ext4: Don't leave behind a half-created inode if ext4_mkdir() fails If ext4_mkdir() fails to allocate the initial block for the directory, don't leave behind a half-created directory inode with the link count left at one. This was caused by an inappropriate call to ext4_dec_count(). Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit b73fce69ecb091a178ef9286027c370a63eb25aa Author: Valerie Clement Date: Fri Feb 15 13:48:51 2008 -0500 ext4: Fix kernel BUG at fs/ext4/mballoc.c:910! With the flex_bg feature enabled, a large file creation oopses the kernel. The BUG_ON is: BUG_ON(len >= EXT4_BLOCKS_PER_GROUP(sb)); As the allocation of the bitmaps and the inode table can be done outside the block group with flex_bg, this allows to allocate up to EXT4_BLOCKS_PER_GROUP blocks in a group. This patch fixes the oops. Signed-off-by: Valerie Clement Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 55bd725aa3a83b3935988f37275b5a80e10d4169 Author: Aneesh Kumar K.V Date: Fri Feb 15 12:47:21 2008 -0500 ext4: Fix locking hierarchy violation in ext4_fallocate() ext4_fallocate() was trying to acquire i_data_sem outside of jbd2_start_transaction/jbd2_journal_stop, which violates ext4's locking hierarchy. So we take i_mutex to prevent writes and truncates during the complete fallocate operation, and use ext4_get_block_wrap() which acquires and releases i_data_sem for each block allocation. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Mingming Cao Signed-off-by: "Theodore Ts'o" commit 642be6ec218b956fbae88304449720f76ba0d578 Author: Andi Kleen Date: Mon Feb 25 17:20:46 2008 -0500 Remove incorrect BKL comments in ext4 Signed-off-by: Andi Kleen Signed-off-by: "Theodore Ts'o"