26 Apr, 2018

1 commit

  • [ Upstream commit 5bdd0c6f89fba430e18d636493398389dadc3b17 ]

    If jffs2_iget() fails for a newly-allocated inode, jffs2_do_clear_inode()
    can get called twice in the error handling path, the first call in
    jffs2_iget() itself and the second through iget_failed(). This can result
    to a use-after-free error in the second jffs2_do_clear_inode() call, such
    as shown by the oops below wherein the second jffs2_do_clear_inode() call
    was trying to free node fragments that were already freed in the first
    jffs2_do_clear_inode() call.

    [ 78.178860] jffs2: error: (1904) jffs2_do_read_inode_internal: CRC failed for read_inode of inode 24 at physical location 0x1fc00c
    [ 78.178914] Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b6b7b
    [ 78.185871] pgd = ffffffc03a567000
    [ 78.188794] [6b6b6b6b6b6b6b7b] *pgd=0000000000000000, *pud=0000000000000000
    [ 78.194968] Internal error: Oops: 96000004 [#1] PREEMPT SMP
    ...
    [ 78.513147] PC is at rb_first_postorder+0xc/0x28
    [ 78.516503] LR is at jffs2_kill_fragtree+0x28/0x90 [jffs2]
    [ 78.520672] pc : [] lr : [] pstate: 60000105
    [ 78.526757] sp : ffffff800cea38f0
    [ 78.528753] x29: ffffff800cea38f0 x28: ffffffc01f3f8e80
    [ 78.532754] x27: 0000000000000000 x26: ffffff800cea3c70
    [ 78.536756] x25: 00000000dc67c8ae x24: ffffffc033d6945d
    [ 78.540759] x23: ffffffc036811740 x22: ffffff800891a5b8
    [ 78.544760] x21: 0000000000000000 x20: 0000000000000000
    [ 78.548762] x19: ffffffc037d48910 x18: ffffff800891a588
    [ 78.552764] x17: 0000000000000800 x16: 0000000000000c00
    [ 78.556766] x15: 0000000000000010 x14: 6f2065646f6e695f
    [ 78.560767] x13: 6461657220726f66 x12: 2064656c69616620
    [ 78.564769] x11: 435243203a6c616e x10: 7265746e695f6564
    [ 78.568771] x9 : 6f6e695f64616572 x8 : ffffffc037974038
    [ 78.572774] x7 : bbbbbbbbbbbbbbbb x6 : 0000000000000008
    [ 78.576775] x5 : 002f91d85bd44a2f x4 : 0000000000000000
    [ 78.580777] x3 : 0000000000000000 x2 : 000000403755e000
    [ 78.584779] x1 : 6b6b6b6b6b6b6b6b x0 : 6b6b6b6b6b6b6b6b
    ...
    [ 79.038551] [] rb_first_postorder+0xc/0x28
    [ 79.042962] [] jffs2_do_clear_inode+0x88/0x100 [jffs2]
    [ 79.048395] [] jffs2_evict_inode+0x3c/0x48 [jffs2]
    [ 79.053443] [] evict+0xb0/0x168
    [ 79.056835] [] iput+0x1c0/0x200
    [ 79.060228] [] iget_failed+0x30/0x3c
    [ 79.064097] [] jffs2_iget+0x2d8/0x360 [jffs2]
    [ 79.068740] [] jffs2_lookup+0xe8/0x130 [jffs2]
    [ 79.073434] [] lookup_slow+0x118/0x190
    [ 79.077435] [] walk_component+0xfc/0x28c
    [ 79.081610] [] path_lookupat+0x84/0x108
    [ 79.085699] [] filename_lookup+0x88/0x100
    [ 79.089960] [] user_path_at_empty+0x58/0x6c
    [ 79.094396] [] vfs_statx+0xa4/0x114
    [ 79.098138] [] SyS_newfstatat+0x58/0x98
    [ 79.102227] [] __sys_trace_return+0x0/0x4
    [ 79.106489] Code: d65f03c0 f9400001 b40000e1 aa0103e0 (f9400821)

    The jffs2_do_clear_inode() call in jffs2_iget() is unnecessary since
    iget_failed() will eventually call jffs2_do_clear_inode() if needed, so
    just remove it.

    Fixes: 5451f79f5f81 ("iget: stop JFFS2 from using iget() and read_inode()")
    Reviewed-by: Richard Weinberger
    Signed-off-by: Jake Daryll Obina
    Signed-off-by: Al Viro
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Jake Daryll Obina
     

17 Jul, 2017

1 commit

  • Firstly by applying the following with coccinelle's spatch:

    @@ expression SB; @@
    -SB->s_flags & MS_RDONLY
    +sb_rdonly(SB)

    to effect the conversion to sb_rdonly(sb), then by applying:

    @@ expression A, SB; @@
    (
    -(!sb_rdonly(SB)) && A
    +!sb_rdonly(SB) && A
    |
    -A != (sb_rdonly(SB))
    +A != sb_rdonly(SB)
    |
    -A == (sb_rdonly(SB))
    +A == sb_rdonly(SB)
    |
    -!(sb_rdonly(SB))
    +!sb_rdonly(SB)
    |
    -A && (sb_rdonly(SB))
    +A && sb_rdonly(SB)
    |
    -A || (sb_rdonly(SB))
    +A || sb_rdonly(SB)
    |
    -(sb_rdonly(SB)) != A
    +sb_rdonly(SB) != A
    |
    -(sb_rdonly(SB)) == A
    +sb_rdonly(SB) == A
    |
    -(sb_rdonly(SB)) && A
    +sb_rdonly(SB) && A
    |
    -(sb_rdonly(SB)) || A
    +sb_rdonly(SB) || A
    )

    @@ expression A, B, SB; @@
    (
    -(sb_rdonly(SB)) ? 1 : 0
    +sb_rdonly(SB)
    |
    -(sb_rdonly(SB)) ? A : B
    +sb_rdonly(SB) ? A : B
    )

    to remove left over excess bracketage and finally by applying:

    @@ expression A, SB; @@
    (
    -(A & MS_RDONLY) != sb_rdonly(SB)
    +(bool)(A & MS_RDONLY) != sb_rdonly(SB)
    |
    -(A & MS_RDONLY) == sb_rdonly(SB)
    +(bool)(A & MS_RDONLY) == sb_rdonly(SB)
    )

    to make comparisons against the result of sb_rdonly() (which is a bool)
    work correctly.

    Signed-off-by: David Howells

    David Howells
     

02 Mar, 2017

1 commit


11 Oct, 2016

1 commit

  • Pull more vfs updates from Al Viro:
    ">rename2() work from Miklos + current_time() from Deepa"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: Replace current_fs_time() with current_time()
    fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps
    fs: Replace CURRENT_TIME with current_time() for inode timestamps
    fs: proc: Delete inode time initializations in proc_alloc_inode()
    vfs: Add current_time() api
    vfs: add note about i_op->rename changes to porting
    fs: rename "rename2" i_op to "rename"
    vfs: remove unused i_op->rename
    fs: make remaining filesystems use .rename2
    libfs: support RENAME_NOREPLACE in simple_rename()
    fs: support RENAME_NOREPLACE for local filesystems
    ncpfs: fix unused variable warning

    Linus Torvalds
     

28 Sep, 2016

1 commit

  • CURRENT_TIME_SEC is not y2038 safe. current_time() will
    be transitioned to use 64 bit time along with vfs in a
    separate patch.
    There is no plan to transistion CURRENT_TIME_SEC to use
    y2038 safe time interfaces.

    current_time() will also be extended to use superblock
    range checking parameters when range checking is introduced.

    This works because alloc_super() fills in the the s_time_gran
    in super block to NSEC_PER_SEC.

    Signed-off-by: Deepa Dinamani
    Acked-by: Jan Kara
    Signed-off-by: Al Viro

    Deepa Dinamani
     

22 Sep, 2016

1 commit

  • inode_change_ok() will be resposible for clearing capabilities and IMA
    extended attributes and as such will need dentry. Give it as an argument
    to inode_change_ok() instead of an inode. Also rename inode_change_ok()
    to setattr_prepare() to better relect that it does also some
    modifications in addition to checks.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jan Kara

    Jan Kara
     

05 Apr, 2016

1 commit

  • PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
    ago with promise that one day it will be possible to implement page
    cache with bigger chunks than PAGE_SIZE.

    This promise never materialized. And unlikely will.

    We have many places where PAGE_CACHE_SIZE assumed to be equal to
    PAGE_SIZE. And it's constant source of confusion on whether
    PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
    especially on the border between fs and mm.

    Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
    breakage to be doable.

    Let's stop pretending that pages in page cache are special. They are
    not.

    The changes are pretty straight-forward:

    - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

    - page_cache_get() -> get_page();

    - page_cache_release() -> put_page();

    This patch contains automated changes generated with coccinelle using
    script below. For some reason, coccinelle doesn't patch header files.
    I've called spatch for them manually.

    The only adjustment after coccinelle is revert of changes to
    PAGE_CAHCE_ALIGN definition: we are going to drop it later.

    There are few places in the code where coccinelle didn't reach. I'll
    fix them manually in a separate patch. Comments and documentation also
    will be addressed with the separate patch.

    virtual patch

    @@
    expression E;
    @@
    - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    expression E;
    @@
    - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    @@
    - PAGE_CACHE_SHIFT
    + PAGE_SHIFT

    @@
    @@
    - PAGE_CACHE_SIZE
    + PAGE_SIZE

    @@
    @@
    - PAGE_CACHE_MASK
    + PAGE_MASK

    @@
    expression E;
    @@
    - PAGE_CACHE_ALIGN(E)
    + PAGE_ALIGN(E)

    @@
    expression E;
    @@
    - page_cache_get(E)
    + get_page(E)

    @@
    expression E;
    @@
    - page_cache_release(E)
    + put_page(E)

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

23 Jan, 2016

1 commit

  • There are many locations that do

    if (memory_was_allocated_by_vmalloc)
    vfree(ptr);
    else
    kfree(ptr);

    but kvfree() can handle both kmalloc()ed memory and vmalloc()ed memory
    using is_vmalloc_addr(). Unless callers have special reasons, we can
    replace this branch with kvfree(). Please check and reply if you found
    problems.

    Signed-off-by: Tetsuo Handa
    Acked-by: Michal Hocko
    Acked-by: Jan Kara
    Acked-by: Russell King
    Reviewed-by: Andreas Dilger
    Acked-by: "Rafael J. Wysocki"
    Acked-by: David Rientjes
    Cc: "Luck, Tony"
    Cc: Oleg Drokin
    Cc: Boris Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tetsuo Handa
     

24 Jun, 2015

1 commit

  • Pull MTD updates from Brian Norris:
    "JFFS2:
    - fix a theoretical unbalanced locking issue; the lock handling was a
    bit unclean, but AFAICT, it didn't actually lead to real deadlocks

    NAND:
    - brcmnand driver: new driver supporting NAND controller found
    originally on Broadcom STB SoCs (BCM7xxx), but now also found on
    BCM63xxx, iProc (e.g., Cygnus, BCM5301x), BCM3xxx, and more

    - begin factoring out BBT code so it can be shared between
    traditional (parallel) NAND drivers and upcoming SPI NAND drivers
    (WIP)

    - add common DT-based init support, so nand_base can pick up some
    flash properties automatically, using established common NAND DT
    properties

    - mxc_nand: support 8-bit ECC

    - pxa3xx_nand:
    * fix build for ARM64
    * use a jiffies-based timeout

    SPI NOR:
    - add a few new IDs

    - clear out some unnecessary entries

    - make sure SECT_4K flags are correct for all (?) entries

    Core:
    - fix mtd->usecount race conditions (BUG_ON())

    - switch to modern PM ops

    Other:
    - CFI: save code space by de-inlining large functions

    - clean up some partition parser selection code across several
    drivers

    - various miscellaneous changes, mostly minor"

    * tag 'for-linus-20150623' of git://git.infradead.org/linux-mtd: (57 commits)
    mtd: docg3: Fix kasprintf() usage
    mtd: docg3: Don't leak docg3->bbt in error path
    mtd: nandsim: Fix kasprintf() usage
    mtd: cs553x_nand: Fix kasprintf() usage
    mtd: r852: Fix device_create_file() usage
    mtd: brcmnand: drop unnecessary initialization
    mtd: propagate error codes from add_mtd_device()
    mtd: diskonchip: remove two-phase partitioning / registration
    mtd: dc21285: use raw spinlock functions for nw_gpio_lock
    mtd: chips: fixup dependencies, to prevent build error
    mtd: cfi_cmdset_0002: Initialize datum before calling map_word_load_partial
    mtd: cfi: deinline large functions
    mtd: lantiq-flash: use default partition parsers
    mtd: plat_nand: use default partition probe
    mtd: nand: correct indentation within conditional
    mtd: remove incorrect file name
    mtd: blktrans: use better error code for unimplemented ioctl()
    mtd: maps: Spelling s/reseved/reserved/
    mtd: blktrans: change blktrans_getgeo return value
    mtd: mxc_nand: generate nand_ecclayout for 8 bit ECC
    ...

    Linus Torvalds
     

11 May, 2015

1 commit


08 May, 2015

1 commit

  • Li Zefan reported an unbalanced locking issue, found by his
    internal debugging feature on runtime. The particular case he was
    looking at doesn't lead to a deadlock, as the structure that this lock
    is embedded in is freed on error. But we should straighten out the error
    handling.

    Because several callers of jffs2_do_read_inode_internal() /
    jffs2_do_read_inode() already handle the locking/unlocking and inode
    clearing at their own level, let's just push any unlocks/clearing down
    to the caller. This consistency is much easier to verify.

    Reported-by: Li Zefan
    Cc: David Woodhouse
    Cc: Artem Bityutskiy
    Cc: Andrew Morton
    Signed-off-by: Brian Norris

    Brian Norris
     

16 Apr, 2015

1 commit


08 Apr, 2014

1 commit

  • Pull MTD updates from Brian Norris:
    - A few SPI NOR ID definitions
    - Kill the NAND "max pagesize" restriction
    - Fix some x16 bus-width NAND support
    - Add NAND JEDEC parameter page support
    - DT bindings for NAND ECC
    - GPMI NAND updates (subpage reads)
    - More OMAP NAND refactoring
    - New STMicro SPI NOR driver (now in 40 patches!)
    - A few other random bugfixes

    * tag 'for-linus-20140405' of git://git.infradead.org/linux-mtd: (120 commits)
    Fix index regression in nand_read_subpage
    mtd: diskonchip: mem resource name is not optional
    mtd: nand: fix mention to CONFIG_MTD_NAND_ECC_BCH
    mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
    mtd: omap2: Use devm_ioremap_resource()
    mtd: denali_dt: Use devm_ioremap_resource()
    mtd: devices: elm: update DRIVER_NAME as "omap-elm"
    mtd: devices: elm: configure parallel channels based on ecc_steps
    mtd: devices: elm: clean elm_load_syndrome
    mtd: devices: elm: check for hardware engine's design constraints
    mtd: st_spi_fsm: Succinctly reorganise .remove()
    mtd: st_spi_fsm: Allow loop to run at least once before giving up CPU
    mtd: st_spi_fsm: Correct vendor name spelling issue - missing "M"
    mtd: st_spi_fsm: Avoid duplicating MTD core code
    mtd: st_spi_fsm: Remove useless consts from function arguments
    mtd: st_spi_fsm: Convert ST SPI FSM (NOR) Flash driver to new DT partitions
    mtd: st_spi_fsm: Move runtime configurable msg sequences into device's struct
    mtd: st_spi_fsm: Supply the W25Qxxx chip specific configuration call-back
    mtd: st_spi_fsm: Supply the S25FLxxx chip specific configuration call-back
    mtd: st_spi_fsm: Supply the MX25xxx chip specific configuration call-back
    ...

    Linus Torvalds
     

04 Apr, 2014

2 commits

  • This patch removes read_cache_page_async() which wasn't really needed
    anywhere and simplifies the code around it a bit.

    read_cache_page_async() is useful when we want to read a page into the
    cache without waiting for it to complete. This happens when the
    appropriate callback 'filler' doesn't complete its read operation and
    releases the page lock immediately, and instead queues a different
    completion routine to do that. This never actually happened anywhere in
    the code.

    read_cache_page_async() had 3 different callers:

    - read_cache_page() which is the sync version, it would just wait for
    the requested read to complete using wait_on_page_read().

    - JFFS2 would call it from jffs2_gc_fetch_page(), but the filler
    function it supplied doesn't do any async reads, and would complete
    before the filler function returns - making it actually a sync read.

    - CRAMFS would call it using the read_mapping_page_async() wrapper, with
    a similar story to JFFS2 - the filler function doesn't do anything that
    reminds async reads and would always complete before the filler function
    returns.

    To sum it up, the code in mm/filemap.c never took advantage of having
    read_cache_page_async(). While there are filler callbacks that do async
    reads (such as the block one), we always called it with the
    read_cache_page().

    This patch adds a mandatory wait for read to complete when adding a new
    page to the cache, and removes read_cache_page_async() and its wrappers.

    Signed-off-by: Sasha Levin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     
  • Reclaim will be leaving shadow entries in the page cache radix tree upon
    evicting the real page. As those pages are found from the LRU, an
    iput() can lead to the inode being freed concurrently. At this point,
    reclaim must no longer install shadow pages because the inode freeing
    code needs to ensure the page tree is really empty.

    Add an address_space flag, AS_EXITING, that the inode freeing code sets
    under the tree lock before doing the final truncate. Reclaim will check
    for this flag before installing shadow pages.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Rik van Riel
    Reviewed-by: Minchan Kim
    Cc: Andrea Arcangeli
    Cc: Bob Liu
    Cc: Christoph Hellwig
    Cc: Dave Chinner
    Cc: Greg Thelen
    Cc: Hugh Dickins
    Cc: Jan Kara
    Cc: KOSAKI Motohiro
    Cc: Luigi Semenzato
    Cc: Mel Gorman
    Cc: Metin Doslu
    Cc: Michel Lespinasse
    Cc: Ozgun Erdogan
    Cc: Peter Zijlstra
    Cc: Roman Gushchin
    Cc: Ryan Mallon
    Cc: Tejun Heo
    Cc: Vlastimil Babka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

11 Mar, 2014

1 commit

  • If jffs2_new_inode() succeeds, it returns with f->sem held, and the caller
    is responsible for releasing the lock. If it fails, it still returns with
    the lock held, but the caller won't release the lock, which will lead to
    deadlock.

    Fix it by releasing the lock in jffs2_new_inode() on error.

    Signed-off-by: Wang Guoli
    Signed-off-by: Wang Nan
    Cc: Artem Bityutskiy
    Cc: David Woodhouse
    Cc: Wang Guoli
    Signed-off-by: Andrew Morton
    [Brian: not marked for stable; no one observed deadlock, and I don't
    think it can happen here]
    Signed-off-by: Brian Norris

    Wang Guoli
     

26 Jan, 2014

1 commit


28 Oct, 2013

1 commit


21 Sep, 2012

1 commit


06 May, 2012

1 commit

  • After we moved inode_sync_wait() from end_writeback() it doesn't make sense
    to call the function end_writeback() anymore. Rename it to clear_inode()
    which well says what the function really does - set I_CLEAR flag.

    Signed-off-by: Jan Kara
    Signed-off-by: Fengguang Wu

    Jan Kara
     

31 Mar, 2012

1 commit

  • Pull MTD changes from David Woodhouse:
    - Artem's cleanup of the MTD API continues apace.
    - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
    others.
    - More work on DiskOnChip G3, new driver for DiskOnChip G4.
    - Clean up debug/warning printks in JFFS2 to use pr_.

    Fix up various trivial conflicts, largely due to changes in calling
    conventions for things like dmaengine_prep_slave_sg() (new inline
    wrapper to hide new parameter, clashing with rewrite of previously last
    parameter that used to be an 'append' flag, and is now a bitmap of
    'unsigned long flags').

    (Also some header file fallout - like so many merges this merge window -
    and silly conflicts with sparse fixes)

    * tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
    mtd: docg3 add protection against concurrency
    mtd: docg3 refactor cascade floors structure
    mtd: docg3 increase write/erase timeout
    mtd: docg3 fix inbound calculations
    mtd: nand: gpmi: fix function annotations
    mtd: phram: fix section mismatch for phram_setup
    mtd: unify initialization of erase_info->fail_addr
    mtd: support ONFI multi lun NAND
    mtd: sm_ftl: fix typo in major number.
    mtd: add device-tree support to spear_smi
    mtd: spear_smi: Remove default partition information from driver
    mtd: Add device-tree support to fsmc_nand
    mtd: fix section mismatch for doc_probe_device
    mtd: nand/fsmc: Remove sparse warnings and errors
    mtd: nand/fsmc: Add DMA support
    mtd: nand/fsmc: Access the NAND device word by word whenever possible
    mtd: nand/fsmc: Use dev_err to report error scenario
    mtd: nand/fsmc: Use devm routines
    mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
    mtd: fsmc_nand: add pm callbacks to support hibernation
    ...

    Linus Torvalds
     

27 Mar, 2012

3 commits

  • Use pr_fmt to prefix KBUILD_MODNAME to appropriate logging messages.

    Remove now unnecessary internal prefixes from formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     
  • Use the more current logging style.

    Coalesce formats, align arguments.
    Convert uses of embedded function names to %s, __func__.

    A couple of long line checkpatch errors I don't care about exist.

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     
  • D1 and D2 macros are mostly uses to emit debugging messages.

    Convert the logging uses of D1 & D2 to jffs2_dbg(level, fmt, ...)
    to be a bit more consistent style with the rest of the kernel.

    All jffs2_dbg output is now at KERN_DEBUG where some of
    the previous uses were emitted at various KERN_s.

    Signed-off-by: Joe Perches
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joe Perches
     

21 Mar, 2012

1 commit


10 Jan, 2012

1 commit

  • after 250df6ed274d767da844a5d9f05720b804240197
    (fs: protect inode->i_state with inode->i_lock), insert_inode_locked()
    no longer returns the inode with I_NEW set on failure. However,
    the error handler still calls unlock_new_inode() on failure,
    which does a WARN_ON if I_NEW is not set, so any failure spews
    a lot of warnings.

    We can just drop the unlock_new_inode() if insert_inode_locked()
    fails here.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Eric Sandeen
     

08 Nov, 2011

1 commit

  • * git://git.infradead.org/mtd-2.6: (226 commits)
    mtd: tests: annotate as DANGEROUS in Kconfig
    mtd: tests: don't use mtd0 as a default
    mtd: clean up usage of MTD_DOCPROBE_ADDRESS
    jffs2: add compr=lzo and compr=zlib options
    jffs2: implement mount option parsing and compression overriding
    mtd: nand: initialize ops.mode
    mtd: provide an alias for the redboot module name
    mtd: m25p80: don't probe device which has status of 'disabled'
    mtd: nand_h1900 never worked
    mtd: Add DiskOnChip G3 support
    mtd: m25p80: add EON flash EN25Q32B into spi flash id table
    mtd: mark block device queue as non-rotational
    mtd: r852: make r852_pm_ops static
    mtd: m25p80: add support for at25df321a spi data flash
    mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
    mtd: nand: switch `check_pattern()' to standard `memcmp()'
    mtd: nand: invalidate cache on unaligned reads
    mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
    mtd: nand: wait to set BBT version
    mtd: nand: scrub BBT on ECC errors
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-at91/board-usb-a9260.c
    Merged into board-usb-a926x.c
    - drivers/mtd/maps/lantiq-flash.c
    add_mtd_partitions -> mtd_device_register vs changed to use
    mtd_device_parse_register.

    Linus Torvalds
     

02 Nov, 2011

1 commit


19 Oct, 2011

1 commit

  • Currently jffs2 has compile-time constants (and .config options)
    controlling whether or not the various compression/decompression
    drivers are built in and enabled. This is fine for embedded
    systems, but it clashes with distribution kernels. Distro kernels
    tend to turn on everything; this causes OpenFirmware to fall
    over, as it understands ZLIB-compressed inodes. Booting a kernel
    that has LZO compression enabled, writing to the boot partition,
    and then rebooting causes OFW to fail to read the kernel from
    the filesystem. This is because LZO compression has priority
    when writing new data to jffs2, if LZO is enabled.

    This patch adds mount option parsing, and a single supported
    option ("compr=none"). This adds the flexibility of being
    able to specify which compressor overrides on a per-superblock
    basis. For now, we can simply disable compression;
    additional flexibility coming soon.

    v2: kill some printks, and implement show_options as suggested
    by Artem Bityutskiy.

    Signed-off-by: Andres Salomon
    Signed-off-by: Artem Bityutskiy

    Andres Salomon
     

01 Aug, 2011

1 commit


27 Jul, 2011

1 commit


24 Jul, 2011

1 commit

  • casting int * to mode_t * is not a good thing - on a *lot* of big-endian
    architectures mode_t happens to be smaller than int and there it breaks
    quite spectaculary...

    Fucked-up-by: commit cfc8dc6f6f69ede939e09c2af06a01adee577285
    Signed-off-by: Al Viro

    Al Viro
     

27 May, 2011

1 commit

  • Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
    anything else, so that the filesystem can track internally if it
    needs to push out a transaction for fdatasync or not.

    This is just the prototype change with no user for it yet. I plan
    to push large XFS changes for the next merge window, and getting
    this trivial infrastructure in this window would help a lot to avoid
    tree interdependencies.

    Also remove incorrect comments that ->dirty_inode can't block. That
    has been changed a long time ago, and many implementations rely on it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

30 Oct, 2010

1 commit


25 Oct, 2010

1 commit

  • When JFFS2 is used for large volumes, the mount times are quite long.
    Increasing the hash size provides a significant speed boost on the OLPC
    XO-1 laptop.

    Add logic that dynamically selects a hash size based on the size of
    the medium. A 64mb medium will result in a hash size of 128, and a 512mb
    medium will result in a hash size of 1024.

    Signed-off-by: Daniel Drake
    Signed-off-by: David Woodhouse

    Daniel Drake
     

05 Oct, 2010

1 commit

  • The BKL is only used in put_super, fill_super and remount_fs that are all
    three protected by the superblocks s_umount rw_semaphore. Therefore it is
    safe to remove the BKL entirely.

    Signed-off-by: Arnd Bergmann
    Cc: David Woodhouse

    Arnd Bergmann
     

11 Aug, 2010

1 commit

  • * git://git.infradead.org/mtd-2.6: (79 commits)
    mtd: Remove obsolete include
    mtd: Update copyright notices
    jffs2: Update copyright notices
    mtd-physmap: add support users can assign the probe type in board files
    mtd: remove redwood map driver
    mxc_nand: Add v3 (i.MX51) Support
    mxc_nand: support 8bit ecc
    mxc_nand: fix correct_data function
    mxc_nand: add V1_V2 namespace to registers
    mxc_nand: factor out a check_int function
    mxc_nand: make some internally used functions overwriteable
    mxc_nand: rework get_dev_status
    mxc_nand: remove 0xe00 offset from registers
    mtd: denali: Add multi connected NAND support
    mtd: denali: Remove set_ecc_config function
    mtd: denali: Remove unuseful code in get_xx_nand_para functions
    mtd: denali: Remove device_info_tag structure
    mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip
    mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips
    mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips
    ...

    Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to
    redwood driver removal.

    Linus Torvalds
     

10 Aug, 2010

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Make sure we check the truncate constraints early on in ->setattr by adding
    those checks to inode_change_ok. Also clean up and document inode_change_ok
    to make this obvious.

    As a fallout we don't have to call inode_newsize_ok from simple_setsize and
    simplify it down to a truncate_setsize which doesn't return an error. This
    simplifies a lot of setattr implementations and means we use truncate_setsize
    almost everywhere. Get rid of fat_setsize now that it's trivial and mark
    ext2_setsize static to make the calling convention obvious.

    Keep the inode_newsize_ok in vmtruncate for now as all callers need an
    audit for its removal anyway.

    Note: setattr code in ecryptfs doesn't call inode_change_ok at all and
    needs a deeper audit, but that is left for later.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

08 Aug, 2010

1 commit