aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-09mtd: tests: stresstest: bail out if device has not enough eraseblocksWolfram Sang1-0/+7
stresstest needs at least two eraseblocks. Bail out gracefully if that condition is not met. Fixes the following 'division by zero' OOPS: [ 619.100000] mtd_stresstest: MTD device size 131072, eraseblock size 131072, page size 2048, count of eraseblocks 1, pages per eraseblock 64, OOB size 64 [ 619.120000] mtd_stresstest: scanning for bad eraseblocks [ 619.120000] mtd_stresstest: scanned 1 eraseblocks, 0 are bad [ 619.130000] mtd_stresstest: doing operations [ 619.130000] mtd_stresstest: 0 operations done [ 619.140000] Division by zero in kernel. ... caused by /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */ eb %= (ebcnt - 1); Cc: [email protected] Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: convert drivers/mtd/* to use module_platform_driver()Axel Lin29-345/+30
This patch converts the drivers in drivers/mtd/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <[email protected]> Acked by: Haojian Zhuang <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09Documentation: add sysfs entries for mtd docg3 chipsRobert Jarzmik1-0/+34
Add documentation for MSystems disk-on-chip docg3 chips sysfs entries, which enable and disable protection areas, giving or disabling access to the chip's memory. Signed-off-by: Robert Jarzmik <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: dereferencing an ERR_PTR() in docg3_probe()Dan Carpenter1-9/+12
If doc_probe_device() returned an ERR_PTR, then we accidentally saved that to docg3_floors[floor] = mtd; which gets derefenced in the error handling when we call doc_release_device(). I've reworked the error handling to take care of that and hopefully make it a little simpler. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: Remove redundant spi driver bus initializationLars-Peter Clausen3-3/+0
In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add protection areas sysfs accessRobert Jarzmik2-0/+134
As each docg3 chip has 2 protection areas (DPS0 and DPS1), and because theses areas can prevent user access to the chip data, add for each floor the sysfs entries which insert the protection key into the right DPS. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add fast modeRobert Jarzmik2-20/+75
Docg3 chips can work in 3 modes : normal MLC mode, fast mode and reliable mode. Normally, as docg3 is a MLC chip, it should be configured to work in normal mode. In both normal mode, each page is distinct. This means that writing to page 12 of blocks 14,15 writes only to that page, and reading from page 12 of blocks 14,15 reads only from that page. In reliable and fast modes, pages are coupled by pairs, and are clones one of each other. This means that the available capacity of the chip is halved. Pages are coupled in each block, and page of index 2*n contains the same data as page 2*n+1 of the same block. In fast mode, the reads occur a bit faster, but are a bit less reliable that in normal mode. When reading from page 2*n, the chip reads bytes from both page 2*n and page 2*n+1, makes a logical and for each byte, and returns the result. As programming a page means "clearing bits", even if a bit was not cleared on one page because the flash is worn out, the other page has the bit cleared, and the result of the "AND" gives a correct result. When writing to page 2*n, the chip writes data to both page 2*n and page 2*n+1. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add suspend and resumeRobert Jarzmik2-1/+80
Add functions to powerdown and powerup from suspend, in order to save power. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add ECC correction codeRobert Jarzmik3-23/+113
Credit for discovering the BCH algorith parameters, and bit reversing algorithm is to be give to Mike Dunn and Ivan Djelic. The BCH correction code relied upon the BCH library, where all data and ECC is bit-reversed. The BCH library works correctly when each input byte is bit-reversed, and accordingly ECC output is also bit-reversed. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: map erase and write functionsRobert Jarzmik1-10/+4
Map the developped write and erase functions into the mtd structure. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add erase functionsRobert Jarzmik1-0/+90
Add erase capability to the docg3 driver. The erase block is made of 2 physical blocks, as both share all 64 pages. That makes an erase block of at least 64 kBytes. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add write functionsRobert Jarzmik1-12/+541
Add write capability to the docg3 driver. The writes are possible on a single page (512 bytes + 16 bytes), even if that page is split on 2 physical pages on 2 blocks (each on one plane). Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add OOB buffer to device structureRobert Jarzmik1-0/+8
Add OOB buffer area to store the OOB data until the actual page is written, so that it can be completed by hardware ECC generator. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add registers for erasing and writingRobert Jarzmik1-1/+13
Add the required registers and commands to erase and write flash pages / blocks. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add OOB layout to mtdinfoRobert Jarzmik1-0/+15
Add OOB layout description for docg3, so that userspace can use this information to setup the data for write_oob(). Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: add multiple floor supportRobert Jarzmik2-56/+126
Add support for multiple floors, ie. cascaded docg3 chips. There might be 4 docg3 chips cascaded, sharing the same address space, and providing up to 4 times the storage capacity of a unique chip. Each floor will be seen as an independant mtd device. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: fix reading oob+data without correctionRobert Jarzmik1-99/+95
Fix the docg3 reads to be able to cope with all possible data buffer / oob buffer / file mode combinations from docg3_read_oob(). This especially ensures that raw reads do not use ECC corrections, and AUTOOOB and PLACEOOB do use ECC correction. The approach is to empty docg3_read() and make it a wrapper to docg3_read_oob(). As docg3_read_oob() handles all the funny cases (no data buffer but oob buffer, data buffer but no oob buffer, ...), docg3_read() is just a special use of docg3_read_oob(). Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: fix BCH registersRobert Jarzmik1-1/+1
BCH registers are contiguous, not on every byte. Fix the register definitions. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: fix protection areas readingRobert Jarzmik1-7/+9
The protection areas boundaries were on 16bit registers, not 8bit. This is consistent with block numbers, which can extend up to 4096 on bigger chips (and is 2048 on the docg3). Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: fix tracing of IO in writebRobert Jarzmik1-1/+1
Writeb was incorrectly traced as a 16 bits write, instead of a 8 bits write. Fix it by tracing the correct width. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: docg3: fix debug log verbosityRobert Jarzmik1-1/+1
Change the NOP debug log verbosity to very verbose to unburden log analysis. Signed-off-by: Robert Jarzmik <[email protected]> Reviewed-by: Ivan Djelic <[email protected]> Reviewed-by: Mike Dunn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: nand: Making MTD_NAND_OMAP2 depend on ARCH_OMAP2PLUSShubhrajyoti D1-1/+1
Making MTD_NAND_OMAP2 depend on ARCH_OMAP2PLUS instead of oring with ARCH2/3/4. Reported-by: Russell King <[email protected]> Signed-off-by: Shubhrajyoti D <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: cfi: Allow per-mapping CFI device endiannessAaron Sierra4-57/+41
This patch allows each CFI device map to use its own endianness. The globally defined CFI endianness (CONFIG_MTD_CFI_NOSWAP, CONFIG_MTD_CFI_BE_BYTE_SWAP or CONFIG_MTD_CFI_LE_BYTE_SWAP) becomes the default value which can be overridden by a driver for a particular device. Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: mtd_blkdevs: don't increase 'open' count on error pathBrian Norris1-1/+2
Some error paths in mtd_blkdevs were fixed in the following commit: commit 94735ec4044a6d318b83ad3c5794e931ed168d10 mtd: mtd_blkdevs: fix error path in blktrans_open But on these error paths, the block device's `dev->open' count is already incremented before we check for errors. This meant that, while the error path was handled correctly on the first time through blktrans_open(), the device is erroneously considered already open on the second time through. This problem can be seen, for instance, when a UBI volume is simultaneously mounted as a UBIFS partition and read through its corresponding gluebi mtdblockX device. This results in blktrans_open() passing its error checks (with `dev->open > 0') without actually having a handle on the device. Here's a summarized log of the actions and results with nandsim: # modprobe nandsim # modprobe mtdblock # modprobe gluebi # modprobe ubifs # ubiattach /dev/ubi_ctrl -m 0 ... # ubimkvol /dev/ubi0 -N test -s 16MiB ... # mount -t ubifs ubi0:test /mnt # ls /dev/mtdblock* /dev/mtdblock0 /dev/mtdblock1 # cat /dev/mtdblock1 > /dev/null cat: can't open '/dev/mtdblock4': Device or resource busy # cat /dev/mtdblock1 > /dev/null CPU 0 Unable to handle kernel paging request at virtual address fffffff0, epc == 8031536c, ra == 8031f280 Oops[#1]: ... Call Trace: [<8031536c>] ubi_leb_read+0x14/0x164 [<8031f280>] gluebi_read+0xf0/0x148 [<802edba8>] mtdblock_readsect+0x64/0x198 [<802ecfe4>] mtd_blktrans_thread+0x330/0x3f4 [<8005be98>] kthread+0x88/0x90 [<8000bc04>] kernel_thread_helper+0x10/0x18 Cc: [email protected] [3.0+] Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: nand: scan 1st and 2nd page for Macronix SLCBrian Norris1-3/+4
Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: nand: add 512 Mbit device code (Macronix)Brian Norris1-1/+2
Macronix MX30LF1208AA is a 512 Mbit NAND with device code 0xF0. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09mtd: nand: add Macronix manufacturerBrian Norris2-0/+2
Macronix is produing SLC NAND MX30LF1208AA, so add their manufacturer code to the manufacturer lists. Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2012-01-09Merge branch 'samsung/cleanup' into next/boardsArnd Bergmann1104-12914/+12816
Conflicts: arch/arm/mach-imx/mach-imx6q.c arch/arm/mach-omap2/board-ti8168evm.c arch/arm/mach-s3c64xx/Kconfig arch/arm/mach-tegra/Makefile arch/arm/mach-tegra/board-dt-tegra20.c arch/arm/mach-tegra/common.c Lots of relatively simple conflicts between the board changes and stuff from the arm tree. This pulls in the resolution from the samsung/cleanup tree, so we don't get conflicting merges. Signed-off-by: Arnd Bergmann <[email protected]>
2012-01-09xen/mmu: Fix compile errors introduced by x86/memblock mismerge.Konrad Rzeszutek Wilk1-1/+1
The git commit d4bbf7e7759afc172e2bfbc5c416324590049cdd "Merge branch 'master' into x86/memblock" mismerged the 32-bit section causing: arch/x86/xen/mmu.c: In function ‘xen_setup_kernel_pagetable’: arch/x86/xen/mmu.c:1855: error: expected ‘;’ before ‘)’ token arch/x86/xen/mmu.c:1855: error: expected statement before ‘)’ token Acked-by: Tejun Heo <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2012-01-09Merge branch 'for-linus' of ↵Linus Torvalds6-40/+27
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ext[34]: avoid i_nlink warnings triggered by drop_nlink/inc_nlink kludge in symlink() exofs: oops after late failure in mount devpts: fix double-free on mount failure ... and the same for gadgetfs functionfs: unfuck failure exits on mount
2012-01-09Merge branch 'samsung/driver' into next/driversArnd Bergmann1271-12763/+12353
Conflicts: arch/arm/mach-mxs/include/mach/common.h Pull in previous samsung conflict merges and do a trivial merge of an mxs double-add conflict. Signed-off-by: Arnd Bergmann <[email protected]>
2012-01-09Merge branch 'samsung/cleanup' into samsung/driverArnd Bergmann1283-12937/+12509
Conflicts: arch/arm/mach-s5p64x0/cpu.c -> common.c More changes to a file that got moved into common.c, see previous conflict resolutions. Signed-off-by: Arnd Bergmann <[email protected]>
2012-01-09Merge branch 'for-linus' of ↵Linus Torvalds49-2019/+1986
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (31 commits) [S390] disassembler: mark exception causing instructions [S390] Enable exception traces by default [S390] return address of compat signals [S390] sysctl: get rid of dead declaration [S390] dasd: fix fixpoint divide exception in define_extent [S390] dasd: add sanity check to detect path connection error [S390] qdio: fix kernel panic for zfcp 31-bit [S390] Add s390x description to Documentation/kdump/kdump.txt [S390] Add VMCOREINFO_SYMBOL(high_memory) to vmcoreinfo [S390] dasd: fix expiration handling for recovery requests [S390] outstanding interrupts vs. smp_send_stop [S390] ipc: call generic sys_ipc demultiplexer [S390] zcrypt: Fix error return codes. [S390] zcrypt: Rework length parameter checking. [S390] cleanup trap handling [S390] Remove Kerntypes leftovers [S390] topology: increase poll frequency if change is anticipated [S390] entry[64].S improvements [S390] make arch/s390 subdirectories depend on config option [S390] kvm: move cmf host id constant out of lowcore ... Fix up conflicts in arch/s390/kernel/{smp.c,topology.c} due to the sysdev removal clashing with "topology: get rid of ifdefs" which moved some of that code around.
2012-01-09Merge branch 'samsung/cleanup' into next/cleanup2Arnd Bergmann1281-12874/+12485
2012-01-09Merge branch 'samsung/dt' into samsung/cleanupArnd Bergmann1281-12874/+12485
Conflicts: arch/arm/mach-s3c64xx/Makefile arch/arm/mach-s5pc100/Makefile arch/arm/mach-s5pv210/Makefile Pull in previously resolved conflicts: The Makefiles were reorganized in the "rmk/restart" series and modified in the "samsung/cleanup series". This also pulls in the other conflict resolutions from the restart series against the samsung/dt series. Signed-off-by: Arnd Bergmann <[email protected]>
2012-01-09isofs: inode leak on mount failureAl Viro1-2/+5
d_alloc_root() failure leaves root inode leaked... Signed-off-by: Al Viro <[email protected]>
2012-01-09xen/pciback: Expand the warning message to include domain id.Konrad Rzeszutek Wilk1-2/+2
When a PCI device is transferred to another domain and it is still in usage (from the internal perspective), mention which other domain is using it to aid in debugging. [v2: Truncate the verbose message per Jan Beulich suggestion] [v3: Suggestions from Ian Campbell on the wording] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Jan Beulich <[email protected]>
2012-01-09ext2/3/4: delete unneeded includes of module.hPaul Gortmaker19-22/+3
Delete any instances of include module.h that were not strictly required. In the case of ext2, the declaration of MODULE_LICENSE etc. were in inode.c but the module_init/exit were in super.c, so relocate the MODULE_LICENCE/AUTHOR block to super.c which makes it consistent with ext3 and ext4 at the same time. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09ext{3,4}: Fix potential race when setversion ioctl updates inodeDjalal Harouni2-2/+10
The EXT{3,4}_IOC_SETVERSION ioctl() updates i_ctime and i_generation without i_mutex. This can lead to a race with the other operations that update i_ctime. This is not a big issue but let's make the ioctl consistent with how we handle e.g. other timestamp updates and use i_mutex to protect inode changes. Signed-off-by: Djalal Harouni <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09udf: Mark LVID buffer as uptodate before marking it dirtyJan Kara1-0/+6
When we hit EIO while writing LVID, the buffer uptodate bit is cleared. This then results in an anoying warning from mark_buffer_dirty() when we write the buffer again. So just set uptodate flag unconditionally. Reviewed-by: Namjae Jeon <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09ext3: Don't warn from writepage when readonly inode is spotted after errorJan Kara1-3/+21
WARN_ON_ONCE(IS_RDONLY(inode)) tends to trip when filesystem hits error and is remounted read-only. This unnecessarily scares users (well, they should be scared because of filesystem error, but the stack trace distracts them from the right source of their fear ;-). We could as well just remove the WARN_ON but it's not hard to fix it to not trip on filesystem with errors and not use more cycles in the common case so that's what we do. CC: [email protected] Signed-off-by: Jan Kara <[email protected]>
2012-01-09jbd: Remove j_barrier mutexJan Kara3-21/+22
j_barrier mutex is used for serializing different journal lock operations. The problem with it is that e.g. FIFREEZE ioctl results in process leaving kernel with j_barrier mutex held which makes lockdep freak out. Also hibernation code wants to freeze filesystem but it cannot do so because it then cannot hibernate the system because of mutex being locked. So we remove j_barrier mutex and use direct wait on j_barrier_count instead. Since locking journal is a rare operation we don't have to care about fairness or such things. CC: Andrew Morton <[email protected]> Acked-by: Joel Becker <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09reiserfs: Force inode evictions before umount to avoid crashJeff Mahoney1-10/+14
This patch fixes a crash in reiserfs_delete_xattrs during umount. When shrink_dcache_for_umount clears the dcache from generic_shutdown_super, delayed evictions are forced to disk. If an evicted inode has extended attributes associated with it, it will need to walk the xattr tree to locate and remove them. But since shrink_dcache_for_umount will BUG if it encounters active dentries, the xattr tree must be released before it's called or it will crash during every umount. This patch forces the evictions to occur before generic_shutdown_super by calling shrink_dcache_sb first. The additional evictions caused by the removal of each associated xattr file and dir will be automatically handled as they're added to the LRU list. CC: [email protected] CC: [email protected] Signed-off-by: Jeff Mahoney <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09reiserfs: Fix quota mount option parsingJan Kara1-1/+2
When jqfmt mount option is not specified on remount, we mistakenly clear s_jquota_fmt value stored in superblock. Fix the problem. CC: [email protected] CC: [email protected] Signed-off-by: Jan Kara <[email protected]>
2012-01-09udf: Treat symlink component of type 2 as /Jan Kara1-4/+10
Currently, we ignore symlink component of type 2. But mkisofs and other OS' seem to treat it as / so do the same for compatibility. Reported-by: "Gábor S." <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09udf: Fix deadlock when converting file from in-ICB one to normal oneJan Kara2-6/+21
During BKL removal in 2.6.38, conversion of files from in-ICB format to normal format got broken. We call ->writepage with i_data_sem held but udf_get_block() also acquires i_data_sem thus creating A-A deadlock. We fix the problem by dropping i_data_sem before calling ->writepage() which is safe since i_mutex still protects us against any changes in the file. Also fix pagelock - i_data_sem lock inversion in udf_expand_file_adinicb() by dropping i_data_sem before calling find_or_create_page(). CC: [email protected] Reported-by: Matthias Matiak <[email protected]> Tested-by: Matthias Matiak <[email protected]> Reviewed-by: Namjae Jeon <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09udf: Cleanup calling convention of inode_getblk()Jan Kara1-21/+15
inode_getblk() always returned NULL and passed results in its parameters. Make the function return something useful - found block number. Signed-off-by: Jan Kara <[email protected]>
2012-01-09ext2: Fix error handling on inode bitmap corruptionJan Kara1-2/+5
When insert_inode_locked() fails in ext2_new_inode() it most likely means inode bitmap got corrupted and we allocated again inode which is already in use. Also doing unlock_new_inode() during error recovery is wrong since the inode does not have I_NEW set. Fix the problem by informing about filesystem error and jumping to fail: (instead of fail_drop:) which doesn't call unlock_new_inode(). Reviewed-by: Eric Sandeen <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09ext3: Fix error handling on inode bitmap corruptionJan Kara1-2/+6
When insert_inode_locked() fails in ext3_new_inode() it most likely means inode bitmap got corrupted and we allocated again inode which is already in use. Also doing unlock_new_inode() during error recovery is wrong since inode does not have I_NEW set. Fix the problem by jumping to fail: (instead of fail_drop:) which declares filesystem error and does not call unlock_new_inode(). Reviewed-by: Eric Sandeen <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-09ext3: replace ll_rw_block with other functionsZheng Liu3-15/+18
ll_rw_block() is deprecated. Thus we replace it with other functions. CC: Jan Kara <[email protected]> Signed-off-by: Zheng Liu <[email protected]> Signed-off-by: Jan Kara <[email protected]>