29 May, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (36 commits)
    Cache xattr security drop check for write v2
    fs: block_page_mkwrite should wait for writeback to finish
    mm: Wait for writeback when grabbing pages to begin a write
    configfs: remove unnecessary dentry_unhash on rmdir, dir rename
    fat: remove unnecessary dentry_unhash on rmdir, dir rename
    hpfs: remove unnecessary dentry_unhash on rmdir, dir rename
    minix: remove unnecessary dentry_unhash on rmdir, dir rename
    fuse: remove unnecessary dentry_unhash on rmdir, dir rename
    coda: remove unnecessary dentry_unhash on rmdir, dir rename
    afs: remove unnecessary dentry_unhash on rmdir, dir rename
    affs: remove unnecessary dentry_unhash on rmdir, dir rename
    9p: remove unnecessary dentry_unhash on rmdir, dir rename
    ncpfs: fix rename over directory with dangling references
    ncpfs: document dentry_unhash usage
    ecryptfs: remove unnecessary dentry_unhash on rmdir, dir rename
    hostfs: remove unnecessary dentry_unhash on rmdir, dir rename
    hfsplus: remove unnecessary dentry_unhash on rmdir, dir rename
    hfs: remove unnecessary dentry_unhash on rmdir, dir rename
    omfs: remove unnecessary dentry_unhash on rmdir, dir rneame
    udf: remove unnecessary dentry_unhash from rmdir, dir rename
    ...

    Linus Torvalds
     

28 May, 2011

2 commits

  • jffs2 does not have problems with references to unlinked directories.

    CC: David Woodhouse
    CC: linux-mtd@lists.infradead.org
    Signed-off-by: Sage Weil
    Signed-off-by: Al Viro

    Sage Weil
     
  • * git://git.infradead.org/mtd-2.6: (97 commits)
    mtd: kill CONFIG_MTD_PARTITIONS
    mtd: remove add_mtd_partitions, add_mtd_device and friends
    mtd: convert remaining users to mtd_device_register()
    mtd: samsung onenand: convert to mtd_device_register()
    mtd: omap2 onenand: convert to mtd_device_register()
    mtd: txx9ndfmc: convert to mtd_device_register()
    mtd: tmio_nand: convert to mtd_device_register()
    mtd: socrates_nand: convert to mtd_device_register()
    mtd: sharpsl: convert to mtd_device_register()
    mtd: s3c2410 nand: convert to mtd_device_register()
    mtd: ppchameleonevb: convert to mtd_device_register()
    mtd: orion_nand: convert to mtd_device_register()
    mtd: omap2: convert to mtd_device_register()
    mtd: nomadik_nand: convert to mtd_device_register()
    mtd: ndfc: convert to mtd_device_register()
    mtd: mxc_nand: convert to mtd_device_register()
    mtd: mpc5121_nfc: convert to mtd_device_register()
    mtd: jz4740_nand: convert to mtd_device_register()
    mtd: h1910: convert to mtd_device_register()
    mtd: fsmc_nand: convert to mtd_device_register()
    ...

    Fixed up trivial conflicts in
    - drivers/mtd/maps/integrator-flash.c: removed in ARM tree
    - drivers/mtd/maps/physmap.c: addition of afs partition probe type
    clashing with removal of CONFIG_MTD_PARTITIONS

    Linus Torvalds
     

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
     

26 May, 2011

2 commits


25 May, 2011

2 commits

  • Replace direct call to kmalloc for a potentially large, contiguous
    buffer allocation with one to mtd_kmalloc_up_to which helps ensure the
    operation can succeed under low-memory, highly- fragmented situations
    albeit somewhat more slowly.

    Signed-off-by: Grant Erickson
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Grant Erickson
     
  • Remove unused 'jffs2_sb_info *c' variable from 'jffs2_lookup()'
    and 'jffs2_readdir()'.

    Signed-off-by: Sergey Senozhatsky
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Sergey Senozhatsky
     

31 Mar, 2011

1 commit


25 Mar, 2011

1 commit

  • …linux-2.6 into for-linus-1

    * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits)
    [media] rc: update for bitop name changes
    fs: simplify iget & friends
    fs: pull inode->i_lock up out of writeback_single_inode
    fs: rename inode_lock to inode_hash_lock
    fs: move i_wb_list out from under inode_lock
    fs: move i_sb_list out from under inode_lock
    fs: remove inode_lock from iput_final and prune_icache
    fs: Lock the inode LRU list separately
    fs: factor inode disposal
    fs: protect inode->i_state with inode->i_lock
    lib, arch: add filter argument to show_mem and fix private implementations
    SLUB: Write to per cpu data when allocating it
    slub: Fix debugobjects with lockless fastpath
    autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
    autofs4 - remove autofs4_lock
    autofs4 - fix d_manage() return on rcu-walk
    autofs4 - fix autofs4_expire_indirect() traversal
    autofs4 - fix dentry leak in autofs4_expire_direct()
    autofs4 - reinstate last used update on access
    vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
    ...

    NOTE!

    This merge commit was created to fix compilation error. The block
    tree was merged upstream and removed the 'elv_queue_empty()'
    function which the new 'mtdswap' driver is using. So a simple
    merge of the mtd tree with upstream does not compile. And the
    mtd tree has already be published, so re-basing it is not an option.

    To fix this unfortunate situation, I had to merge upstream into the
    mtd-2.6.git tree without committing, put the fixup patch on top of
    this, and then commit this. The result is that we do not have commits
    which do not compile.

    In other words, this merge commit "merges" 3 things: the MTD tree, the
    upstream tree, and the fixup patch.

    Artem Bityutskiy
     

24 Mar, 2011

1 commit


23 Mar, 2011

1 commit

  • Instead of always creating a huge (268K) deflate_workspace with the
    maximum compression parameters (windowBits=15, memLevel=8), allow the
    caller to obtain a smaller workspace by specifying smaller parameter
    values.

    For example, when capturing oops and panic reports to a medium with
    limited capacity, such as NVRAM, compression may be the only way to
    capture the whole report. In this case, a small workspace (24K works
    fine) is a win, whether you allocate the workspace when you need it (i.e.,
    during an oops or panic) or at boot time.

    I've verified that this patch works with all accepted values of windowBits
    (positive and negative), memLevel, and compression level.

    Signed-off-by: Jim Keniston
    Cc: Herbert Xu
    Cc: David Miller
    Cc: Chris Mason
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Keniston
     

11 Mar, 2011

1 commit


08 Mar, 2011

1 commit


02 Feb, 2011

1 commit

  • SELinux would like to implement a new labeling behavior of newly created
    inodes. We currently label new inodes based on the parent and the creating
    process. This new behavior would also take into account the name of the
    new object when deciding the new label. This is not the (supposed) full path,
    just the last component of the path.

    This is very useful because creating /etc/shadow is different than creating
    /etc/passwd but the kernel hooks are unable to differentiate these
    operations. We currently require that userspace realize it is doing some
    difficult operation like that and than userspace jumps through SELinux hoops
    to get things set up correctly. This patch does not implement new
    behavior, that is obviously contained in a seperate SELinux patch, but it
    does pass the needed name down to the correct LSM hook. If no such name
    exists it is fine to pass NULL.

    Signed-off-by: Eric Paris

    Eric Paris
     

18 Jan, 2011

1 commit

  • * git://git.infradead.org/mtd-2.6: (59 commits)
    mtd: mtdpart: disallow reading OOB past the end of the partition
    mtd: pxa3xx_nand: NULL dereference in pxa3xx_nand_probe
    UBI: use mtd->writebufsize to set minimal I/O unit size
    mtd: initialize writebufsize in the MTD object of a partition
    mtd: onenand: add mtd->writebufsize initialization
    mtd: nand: add mtd->writebufsize initialization
    mtd: cfi: add writebufsize initialization
    mtd: add writebufsize field to mtd_info struct
    mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use
    mtd: OneNAND: add enable / disable methods to onenand_chip
    mtd: m25p80: Fix JEDEC ID for AT26DF321
    mtd: txx9ndfmc: limit transfer bytes to 512 (ECC provides 6 bytes max)
    mtd: cfi_cmdset_0002: add support for Samsung K8D3x16UxC NOR chips
    mtd: cfi_cmdset_0002: add support for Samsung K8D6x16UxM NOR chips
    mtd: nand: ams-delta: drop omap_read/write, use ioremap
    mtd: m25p80: add debugging trace in sst_write
    mtd: nand: ams-delta: select for built-in by default
    mtd: OneNAND: lighten scary initial bad block messages
    mtd: OneNAND: OMAP2/3: add support for command line partitioning
    mtd: nand: rearrange ONFI revision checking, add ONFI 2.3
    ...

    Fix up trivial conflict in drivers/mtd/Kconfig as per DavidW.

    Linus Torvalds
     

07 Jan, 2011

2 commits

  • Signed-off-by: Nick Piggin

    Nick Piggin
     
  • RCU free the struct inode. This will allow:

    - Subsequent store-free path walking patch. The inode must be consulted for
    permissions when walking, so an RCU inode reference is a must.
    - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
    to take i_lock no longer need to take sb_inode_list_lock to walk the list in
    the first place. This will simplify and optimize locking.
    - Could remove some nested trylock loops in dcache code
    - Could potentially simplify things a bit in VM land. Do not need to take the
    page lock to follow page->mapping.

    The downsides of this is the performance cost of using RCU. In a simple
    creat/unlink microbenchmark, performance drops by about 10% due to inability to
    reuse cache-hot slab objects. As iterations increase and RCU freeing starts
    kicking over, this increases to about 20%.

    In cases where inode lifetimes are longer (ie. many inodes may be allocated
    during the average life span of a single inode), a lot of this cache reuse is
    not applicable, so the regression caused by this patch is smaller.

    The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
    however this adds some complexity to list walking and store-free path walking,
    so I prefer to implement this at a later date, if it is shown to be a win in
    real situations. I haven't found a regression in any non-micro benchmark so I
    doubt it will be a problem.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

04 Dec, 2010

3 commits


30 Oct, 2010

2 commits

  • * git://git.infradead.org/mtd-2.6: (82 commits)
    mtd: fix build error in m25p80.c
    mtd: Remove redundant mutex from mtd_blkdevs.c
    MTD: Fix wrong check register_blkdev return value
    Revert "mtd: cleanup Kconfig dependencies"
    mtd: cfi_cmdset_0002: make sector erase command variable
    mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chips
    mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY mode
    mtd: cfi_cmdset_0001: use defined value of P_ID_INTEL_PERFORMANCE instead of hardcoded one
    block2mtd: dubious assignment
    P4080/mtd: Fix the freescale lbc issue with 36bit mode
    P4080/eLBC: Make Freescale elbc interrupt common to elbc devices
    mtd: phram: use KBUILD_MODNAME
    mtd: OneNAND: S5PC110: Fix double call suspend & resume function
    mtd: nand: fix MTD_MODE_RAW writes
    jffs2: use kmemdup
    mtd: sm_ftl: cosmetic, use bool when possible
    mtd: r852: remove useless pci powerup/down from suspend/resume routines
    mtd: blktrans: fix a race vs kthread_stop
    mtd: blktrans: kill BKL
    mtd: allow to unload the mtdtrans module if its block devices aren't open
    ...

    Fix up trivial whitespace-introduced conflict in drivers/mtd/mtdchar.c

    Linus Torvalds
     
  • Conflicts:
    drivers/mtd/mtd_blkdevs.c

    Merge Grant's device-tree bits so that we can apply the subsequent fixes.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

29 Oct, 2010

1 commit


26 Oct, 2010

1 commit


25 Oct, 2010

6 commits

  • Convert a sequence of kmalloc and memcpy to use kmemdup.

    The semantic patch that performs this transformation is:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression a,flag,len;
    expression arg,e1,e2;
    statement S;
    @@

    a =
    - \(kmalloc\|kzalloc\)(len,flag)
    + kmemdup(arg,len,flag)

    - memcpy(a,arg,len+1);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Julia Lawall
     
  • Scanning 1024 bytes to see if an EB is empty is a bit much.
    Lower it to 256 bytes and make sure the while loop is
    optimized.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joakim Tjernlund
     
  • Drop the alloc_sem before erasing flash in
    jffs2_garbage_collect_pass().
    Otherwise writes are put on hold until the erase
    has finised.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Joakim Tjernlund
     
  • 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
     
  • The jffs2 compression framework provides a "model" argument when
    compressing and decompressing, but the caller always passes in NULL
    and the callees never use it. So punt this useless overhead.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Mike Frysinger
     
  • yield() has different semantics meanwhile and even causes RT-kernels to
    BUG. Replace the only appearance left in jffs2.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Wolfram Sang
     

05 Oct, 2010

2 commits

  • 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
     
  • This patch is a preparation necessary to remove the BKL from do_new_mount().
    It explicitly adds calls to lock_kernel()/unlock_kernel() around
    get_sb/fill_super operations for filesystems that still uses the BKL.

    I've read through all the code formerly covered by the BKL inside
    do_kern_mount() and have satisfied myself that it doesn't need the BKL
    any more.

    do_kern_mount() is already called without the BKL when mounting the rootfs
    and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
    from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
    through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
    afs_mntpt_follow_link(). Both later functions are actually the filesystems
    follow_link inode operation. vfs_kern_mount() is calling the specified
    get_sb function and lets the filesystem do its job by calling the given
    fill_super function.

    Therefore I think it is safe to push down the BKL from the VFS to the
    low-level filesystems get_sb/fill_super operation.

    [arnd: do not add the BKL to those file systems that already
    don't use it elsewhere]

    Signed-off-by: Jan Blunck
    Signed-off-by: Arnd Bergmann
    Cc: Matthew Wilcox
    Cc: Christoph Hellwig

    Jan Blunck
     

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

3 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • 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
     

09 Aug, 2010

1 commit


08 Aug, 2010

1 commit


22 Jul, 2010

1 commit