18 Dec, 2013

1 commit

  • Pull two Ceph fixes from Sage Weil:
    "One of these is fixing a regression from the d_flags file type patch
    that went into -rc1 that broke instantiation of inodes and dentries
    (we were doing dentries first). The other is just an off-by-one
    corner case"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: Avoid data inconsistency due to d-cache aliasing in readpage()
    ceph: initialize inode before instantiating dentry

    Linus Torvalds
     

14 Dec, 2013

2 commits


13 Dec, 2013

6 commits

  • Merge patches from Andrew Morton:
    "13 fixes"

    * emailed patches from Andrew Morton :
    mm: memcg: do not allow task about to OOM kill to bypass the limit
    mm: memcg: fix race condition between memcg teardown and swapin
    thp: move preallocated PTE page table on move_huge_pmd()
    mfd/rtc: s5m: fix register updating by adding regmap for RTC
    rtc: s5m: enable IRQ wake during suspend
    rtc: s5m: limit endless loop waiting for register update
    rtc: s5m: fix unsuccesful IRQ request during probe
    drivers/rtc/rtc-s5m.c: fix info->rtc assignment
    include/linux/kernel.h: make might_fault() a nop for !MMU
    drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap
    procfs: also fix proc_reg_get_unmapped_area() for !MMU case
    mm: memcg: do not declare OOM from __GFP_NOFAIL allocations
    include/linux/hugetlb.h: make isolate_huge_page() an inline

    Linus Torvalds
     
  • Commit fad1a86e25e0 ("procfs: call default get_unmapped_area on
    MMU-present architectures"), as its title says, took care of only the
    MMU case, leaving the !MMU side still in the regressed state (returning
    -EIO in all cases where pde->proc_fops->get_unmapped_area is NULL).

    From the fad1a86e25e0 changelog:

    "Commit c4fe24485729 ("sparc: fix PCI device proc file mmap(2)") added
    proc_reg_get_unmapped_area in proc_reg_file_ops and
    proc_reg_file_ops_no_compat, by which now mmap always returns EIO if
    get_unmapped_area method is not defined for the target procfs file, which
    causes regression of mmap on /proc/vmcore.

    To address this issue, like get_unmapped_area(), call default
    current->mm->get_unmapped_area on MMU-present architectures if
    pde->proc_fops->get_unmapped_area, i.e. the one in actual file operation
    in the procfs file, is not defined"

    Signed-off-by: Jan Beulich
    Cc: HATAYAMA Daisuke
    Cc: Alexey Dobriyan
    Cc: David S. Miller
    Cc: [3.12.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Pull btrfs fixes from Chris Mason:
    "This is a small collection of fixes. It was rebased this morning, but
    I was just fixing signed-off-by tags with the wrong email"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: fix access_ok() check in btrfs_ioctl_send()
    Btrfs: make sure we cleanup all reloc roots if error happens
    Btrfs: skip building backref tree for uuid and quota tree when doing balance relocation
    Btrfs: fix an oops when doing balance relocation
    Btrfs: don't miss skinny extent items on delayed ref head contention
    btrfs: call mnt_drop_write after interrupted subvol deletion
    Btrfs: don't clear the default compression type

    Linus Torvalds
     
  • Pull nfsd reply cache bugfix from Bruce Fields:
    "One bugfix for nfsd crashes"

    * 'for-3.13' of git://linux-nfs.org/~bfields/linux:
    nfsd: when reusing an existing repcache entry, unhash it first

    Linus Torvalds
     
  • When explicitly hashing the end of a string with the word-at-a-time
    interface, we have to be careful which end of the word we pick up.

    On big-endian CPUs, the upper-bits will contain the data we're after, so
    ensure we generate our masks accordingly (and avoid hashing whatever
    random junk may have been sitting after the string).

    This patch adds a new dcache helper, bytemask_from_count, which creates
    a mask appropriate for the CPU endianness.

    Cc: Al Viro
    Signed-off-by: Will Deacon
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • Pull xfs bugfixes from Ben Myers:

    - fix for buffer overrun in agfl with growfs on v4 superblock

    - return EINVAL if requested discard length is less than a block

    - fix possible memory corruption in xfs_attrlist_by_handle()

    * tag 'xfs-for-linus-v3.13-rc4' of git://oss.sgi.com/xfs/xfs:
    xfs: growfs overruns AGFL buffer on V4 filesystems
    xfs: don't perform discard if the given range length is less than block size
    xfs: underflow bug in xfs_attrlist_by_handle()

    Linus Torvalds
     

12 Dec, 2013

7 commits

  • The closing parenthesis is in the wrong place. We want to check
    "sizeof(*arg->clone_sources) * arg->clone_sources_count" instead of
    "sizeof(*arg->clone_sources * arg->clone_sources_count)".

    Signed-off-by: Dan Carpenter
    Reviewed-by: Jie Liu
    Signed-off-by: Chris Mason
    cc: stable@vger.kernel.org

    Dan Carpenter
     
  • I hit an oops when merging reloc roots fails, the reason is that
    new reloc roots may be added and we should make sure we cleanup
    all reloc roots.

    Signed-off-by: Wang Shilong
    Signed-off-by: Chris Mason

    Wang Shilong
     
  • Quota tree and UUID Tree is only cowed, they can not be snapshoted.

    Signed-off-by: Wang Shilong
    Signed-off-by: Chris Mason

    Wang Shilong
     
  • I hit an oops when inserting reloc root into @reloc_root_tree(it can be
    easily triggered when forcing cow for relocation root)

    [ 866.494539] [] btrfs_init_reloc_root+0x79/0xb0 [btrfs]
    [ 866.495321] [] record_root_in_trans+0xb0/0x110 [btrfs]
    [ 866.496109] [] btrfs_record_root_in_trans+0x48/0x80 [btrfs]
    [ 866.496908] [] select_reloc_root+0xa8/0x210 [btrfs]
    [ 866.497703] [] do_relocation+0x16a/0x540 [btrfs]

    This is because reloc root inserted into @reloc_root_tree is not within one
    transaction,reloc root may be cowed and root block bytenr will be reused then
    oops happens.We should update reloc root in @reloc_root_tree when cow reloc
    root node, fix it.

    Signed-off-by: Wang Shilong
    Reviewed-by: Miao Xie
    Signed-off-by: Chris Mason

    Wang Shilong
     
  • Currently extent-tree.c:btrfs_lookup_extent_info() can miss the lookup
    of skinny extent items. This can happen when the execution flow is the
    following:

    * We do an extent tree lookup and fail to find a skinny extent item;

    * As a result, we attempt to see if a non-skinny extent item exists,
    either by looking at previous item in the leaf or by doing another
    full extent tree search;

    * We have a transaction and then we check for a matching delayed ref
    head in the transaction's delayed refs rbtree;

    * We find such delayed ref head and then we try to lock it with a
    call to mutex_trylock();

    * The lock was contended so we jump to the label "again", which repeats
    the extent tree search but for a non-skinny extent item, because we set
    previously metadata variable to 0 and the search key to look for a
    non-skinny extent-item;

    * After the jump (and after releasing the transaction's delayed refs
    lock), a skinny extent item might have been added to the extent tree
    but we will miss it because metadata is set to 0 and the search key
    is set for a non-skinny extent-item.

    The fix here is to not reset metadata to 0 and to jump to the initial search
    key setup if the delayed ref head is contended, instead of jumping directly
    to the extent tree search label ("again").

    This issue was found while investigating the issue reported at Bugzilla 64961.

    David Sterba suspected this function was missing extent items, and that
    this could be caused by the last change to this function, which was made
    in the following patch:

    [PATCH] Btrfs: optimize btrfs_lookup_extent_info()
    (commit 74be9510876a66ad9826613ac8a526d26f9e7f01)

    But in fact this issue already existed before, because after failing to find
    a skinny extent item, the code set the search key for a non-skinny extent
    item, and on contention of a matching delayed ref head it would not search
    the extent tree for a skinny extent item anymore.

    Signed-off-by: Filipe David Borba Manana
    Reviewed-by: Liu Bo
    Signed-off-by: Chris Mason

    Filipe David Borba Manana
     
  • If btrfs_ioctl_snap_destroy blocks on the mutex and the process is
    killed, mnt_write count is unbalanced and leads to unmountable
    filesystem.

    CC: stable@vger.kernel.org
    Signed-off-by: David Sterba
    Signed-off-by: Chris Mason

    David Sterba
     
  • We met a oops caused by the wrong compression type:
    [ 556.512356] BUG: unable to handle kernel NULL pointer dereference at (null)
    [ 556.512370] IP: [] __list_del_entry+0x1/0x98
    [SNIP]
    [ 556.512490] [] ? list_del+0xd/0x2b
    [ 556.512539] [] find_workspace+0x97/0x175 [btrfs]
    [ 556.512546] [] ? _raw_spin_lock+0xe/0x10
    [ 556.512576] [] btrfs_compress_pages+0x2d/0xa2 [btrfs]
    [ 556.512601] [] compress_file_range.constprop.54+0x1f2/0x4e8 [btrfs]
    [ 556.512627] [] async_cow_start+0x32/0x4d [btrfs]
    [ 556.512655] [] worker_loop+0x144/0x4c3 [btrfs]
    [ 556.512661] [] ? finish_task_switch+0x80/0xb8
    [ 556.512689] [] ? btrfs_queue_worker+0x244/0x244 [btrfs]
    [ 556.512695] [] kthread+0x8d/0x95
    [ 556.512699] [] ? bit_waitqueue+0x34/0x7d
    [ 556.512704] [] ? __kthread_parkme+0x65/0x65
    [ 556.512709] [] ret_from_fork+0x7c/0xb0
    [ 556.512713] [] ? __kthread_parkme+0x65/0x65

    Steps to reproduce:
    # mkfs.btrfs -f
    # mount -o nodatacow
    # touch /
    # chattr =c /
    # dd if=/dev/zero of=/ bs=1M count=10

    It is because we cleared the default compression type when setting the
    nodatacow. In fact, we needn't do it because we have used COMPRESS flag to
    indicate if we need compressed the file data or not, needn't use the
    variant -- compress_type -- in btrfs_info to do the same thing, and just
    use it to hold the default compression type. Or we would get a wrong compress
    type for a file whose own compress flag is set but the compress flag of its
    filesystem is not set.

    Reported-by: Tsutomu Itoh
    Signed-off-by: Miao Xie
    Reviewed-by: Liu Bo
    Signed-off-by: Chris Mason

    Miao Xie
     

11 Dec, 2013

3 commits

  • The DRC code will attempt to reuse an existing, expired cache entry in
    preference to allocating a new one. It'll then search the cache, and if
    it gets a hit it'll then free the cache entry that it was going to
    reuse.

    The cache code doesn't unhash the entry that it's going to reuse
    however, so it's possible for it end up designating an entry for reuse
    and then subsequently freeing the same entry after it finds it. This
    leads it to a later use-after-free situation and usually some list
    corruption warnings or an oops.

    Fix this by simply unhashing the entry that we intend to reuse. That
    will mean that it's not findable via a search and should prevent this
    situation from occurring.

    Cc: stable@vger.kernel.org # v3.10+
    Reported-by: Christoph Hellwig
    Reported-by: g. artim
    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • This loop in xfs_growfs_data_private() is incorrect for V4
    superblocks filesystems:

    for (bucket = 0; bucket < XFS_AGFL_SIZE(mp); bucket++)
    agfl->agfl_bno[bucket] = cpu_to_be32(NULLAGBLOCK);

    For V4 filesystems, we don't have a agfl header structure, and so
    XFS_AGFL_SIZE() returns an entire sector's worth of entries, which
    we then index from an offset into the sector. Hence: buffer overrun.

    This problem was introduced in 3.10 by commit 77c95bba ("xfs: add
    CRC checks to the AGFL") which changed the AGFL structure but failed
    to update the growfs code to handle the different structures.

    Fix it by using the correct offset into the buffer for both V4 and
    V5 filesystems.

    Cc:
    Signed-off-by: Dave Chinner
    Reviewed-by: Jie Liu
    Signed-off-by: Ben Myers

    (cherry picked from commit b7d961b35b3ab69609aeea93f870269cb6e7ba4d)

    Dave Chinner
     
  • For discard operation, we should return EINVAL if the given range length
    is less than a block size, otherwise it will go through the file system
    to discard data blocks as the end range might be evaluated to -1, e.g,
    # fstrim -v -o 0 -l 100 /xfs7
    /xfs7: 9811378176 bytes were trimmed

    This issue can be triggered via xfstests/generic/288.

    Also, it seems to get the request queue pointer via bdev_get_queue()
    instead of the hard code pointer dereference is not a bad thing.

    Signed-off-by: Jie Liu
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Ben Myers

    (cherry picked from commit f9fd0135610084abef6867d984e9951c3099950d)

    Jie Liu
     

10 Dec, 2013

1 commit

  • If we allocate less than sizeof(struct attrlist) then we end up
    corrupting memory or doing a ZERO_PTR_SIZE dereference.

    This can only be triggered with CAP_SYS_ADMIN.

    Reported-by: Nico Golde
    Reported-by: Fabian Yamaguchi
    Signed-off-by: Dan Carpenter
    Reviewed-by: Dave Chinner
    Signed-off-by: Ben Myers

    (cherry picked from commit 071c529eb672648ee8ca3f90944bcbcc730b4c06)

    Dan Carpenter
     

07 Dec, 2013

1 commit


06 Dec, 2013

4 commits

  • Clean up the aio ring file in the fail path of aio_setup_ring
    and ioctx_alloc. And maybe it can fix the GPF issue reported by
    Dave Jones:
    https://lkml.org/lkml/2013/11/25/898

    Signed-off-by: Gu Zheng
    Signed-off-by: Benjamin LaHaise

    Gu Zheng
     
  • Pull power management fixes from Rafael Wysocki:

    - cpufreq regression fix from Bjørn Mork restoring the pre-3.12
    behavior of the framework during system suspend/hibernation to avoid
    garbage sysfs files from being left behind in case of a suspend error

    - PNP regression fix to restore the correct states of devices after
    resume from hibernation broken in 3.12. From Dmitry Torokhov.

    - cpuidle fix to prevent cpuidle device unregistration from crashing
    due to a NULL pointer dereference if cpuidle has been disabled from
    the kernel command line. From Konrad Rzeszutek Wilk.

    - intel_idle fix for the C6 state definition on Intel Avoton/Rangeley
    processors from Arne Bockholdt.

    - Power capping framework fix to make the energy_uj sysfs attribute
    work in accordance with the documentation. From Srinivas Pandruvada.

    - epoll fix to make it ignore the EPOLLWAKEUP flag if the kernel has
    been compiled with CONFIG_PM_SLEEP unset (in which case that flag
    should not have any effect). From Amit Pundir.

    - cpufreq fix to prevent governor sysfs files from being lost over
    system suspend/resume in some (arguably unusual) situations. From
    Viresh Kumar.

    * tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PowerCap: Fix mode for energy counter
    PNP: fix restoring devices after hibernation
    cpuidle: Check for dev before deregistering it.
    epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled
    cpufreq: fix garbage kobjects on errors during suspend/resume
    cpufreq: suspend governors on system suspend/hibernate
    intel_idle: Fixed C6 state on Avoton/Rangeley processors

    Linus Torvalds
     
  • Pull block layer fixes from Jens Axboe:
    "A small collection of fixes for the current series. It contains:

    - A fix for a use-after-free of a request in blk-mq. From Ming Lei

    - A fix for a blk-mq bug that could attempt to dereference a NULL rq
    if allocation failed

    - Two xen-blkfront small fixes

    - Cleanup of submit_bio_wait() type uses in the kernel, unifying
    that. From Kent

    - A fix for 32-bit blkg_rwstat reading. I apologize for this one
    looking mangled in the shortlog, it's entirely my fault for missing
    an empty line between the description and body of the text"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    blk-mq: fix use-after-free of request
    blk-mq: fix dereference of rq->mq_ctx if allocation fails
    block: xen-blkfront: Fix possible NULL ptr dereference
    xen-blkfront: Silence pfn maybe-uninitialized warning
    block: submit_bio_wait() conversions
    Update of blkg_stat and blkg_rwstat may happen in bh context

    Linus Torvalds
     
  • Pull NFS client bugfixes from Trond Myklebust:
    - Stable fix for a NFSv4.1 delegation and state recovery deadlock
    - Stable fix for a loop on irrecoverable errors when returning
    delegations
    - Fix a 3-way deadlock between layoutreturn, open, and state recovery
    - Update the MAINTAINERS file with contact information for Trond
    Myklebust
    - Close needs to handle NFS4ERR_ADMIN_REVOKED
    - Enabling v4.2 should not recompile nfsd and lockd
    - Fix a couple of compile warnings

    * tag 'nfs-for-3.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    nfs: fix do_div() warning by instead using sector_div()
    MAINTAINERS: Update contact information for Trond Myklebust
    NFSv4.1: Prevent a 3-way deadlock between layoutreturn, open and state recovery
    SUNRPC: do not fail gss proc NULL calls with EACCES
    NFSv4: close needs to handle NFS4ERR_ADMIN_REVOKED
    NFSv4: Update list of irrecoverable errors on DELEGRETURN
    NFSv4 wait on recovery for async session errors
    NFS: Fix a warning in nfs_setsecurity
    NFS: Enabling v4.2 should not recompile nfsd and lockd

    Linus Torvalds
     

05 Dec, 2013

3 commits

  • When compiling a 32bit kernel with CONFIG_LBDAF=n the compiler complains like
    shown below. Fix this warning by instead using sector_div() which is provided
    by the kernel.h header file.

    fs/nfs/blocklayout/extents.c: In function ‘normalize’:
    include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    fs/nfs/blocklayout/extents.c:47:13: note: in expansion of macro ‘do_div’
    nfs/blocklayout/extents.c:47:2: warning: right shift count >= width of type [enabled by default]
    fs/nfs/blocklayout/extents.c:47:2: warning: passing argument 1 of ‘__div64_32’ from incompatible pointer type [enabled by default]
    include/asm-generic/div64.h:35:17: note: expected ‘uint64_t *’ but argument is of type ‘sector_t *’
    extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);

    Signed-off-by: Helge Deller
    Signed-off-by: Trond Myklebust

    Helge Deller
     
  • Andy Adamson reports:

    The state manager is recovering expired state and recovery OPENs are being
    processed. If kswapd is pruning inodes at the same time, a deadlock can occur
    when kswapd calls evict_inode on an NFSv4.1 inode with a layout, and the
    resultant layoutreturn gets an error that the state mangager is to handle,
    causing the layoutreturn to wait on the (NFS client) cl_rpcwaitq.

    At the same time an open is waiting for the inode deletion to complete in
    __wait_on_freeing_inode.

    If the open is either the open called by the state manager, or an open from
    the same open owner that is holding the NFSv4 sequence id which causes the
    OPEN from the state manager to wait for the sequence id on the Seqid_waitqueue,
    then the state is deadlocked with kswapd.

    The fix is simply to have layoutreturn ignore all errors except NFS4ERR_DELAY.
    We already know that layouts are dropped on all server reboots, and that
    it has to be coded to deal with the "forgetful client model" that doesn't
    send layoutreturns.

    Reported-by: Andy Adamson
    Link: http://lkml.kernel.org/r/1385402270-14284-1-git-send-email-andros@netapp.com
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Pull squashfs bugfix from Phillip Lougher:
    "Just a single bug fix to the new "directly decompress into the page
    cache" code"

    * tag 'squashfs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next:
    Squashfs: fix failure to unlock pages on decompress error

    Linus Torvalds
     

03 Dec, 2013

2 commits

  • Drop EPOLLWAKEUP from epoll events mask if CONFIG_PM_SLEEP is disabled.

    Signed-off-by: Amit Pundir
    Cc: John Stultz
    Cc: Alexander Viro
    Signed-off-by: Rafael J. Wysocki

    Amit Pundir
     
  • The pipe code was trying (and failing) to be very careful about freeing
    the pipe info only after the last access, with a pattern like:

    spin_lock(&inode->i_lock);
    if (!--pipe->files) {
    inode->i_pipe = NULL;
    kill = 1;
    }
    spin_unlock(&inode->i_lock);
    __pipe_unlock(pipe);
    if (kill)
    free_pipe_info(pipe);

    where the final freeing is done last.

    HOWEVER. The above is actually broken, because while the freeing is
    done at the end, if we have two racing processes releasing the pipe
    inode info, the one that *doesn't* free it will decrement the ->files
    count, and unlock the inode i_lock, but then still use the
    "pipe_inode_info" afterwards when it does the "__pipe_unlock(pipe)".

    This is *very* hard to trigger in practice, since the race window is
    very small, and adding debug options seems to just hide it by slowing
    things down.

    Simon originally reported this way back in July as an Oops in
    kmem_cache_allocate due to a single bit corruption (due to the final
    "spin_unlock(pipe->mutex.wait_lock)" incrementing a field in a different
    allocation that had re-used the free'd pipe-info), it's taken this long
    to figure out.

    Since the 'pipe->files' accesses aren't even protected by the pipe lock
    (we very much use the inode lock for that), the simple solution is to
    just drop the pipe lock early. And since there were two users of this
    pattern, create a helper function for it.

    Introduced commit ba5bb147330a ("pipe: take allocation and freeing of
    pipe_inode_info out of ->i_mutex").

    Reported-by: Simon Kirby
    Reported-by: Ian Applegate
    Acked-by: Al Viro
    Cc: stable@kernel.org # v3.10+
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

30 Nov, 2013

1 commit

  • Pull vfs dentry reference count fix from Al Viro.

    This fixes a possible inode_permission NULL pointer dereference (and
    other problems) that were due to the root dentry count being decremented
    too much. In commit 48a066e72d97 ("RCU'd vfsmounts") the placement of
    clearing the LOOKUP_RCU bit changed, and we then returned failure of
    incrementing the lockref on the parent dentry with LOOKUP_RCU cleared.

    But that meant we needed to go through the same cleanup routines that
    the later failures did wrt LOOKUP_ROOT and nd->root.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fix bogus path_put() of nd->root after some unlazy_walk() failures

    Linus Torvalds
     

29 Nov, 2013

2 commits

  • Failure to grab reference to parent dentry should go through the
    same cleanup as nd->seq mismatch. As it is, we might end up with
    caller thinking it needs to path_put() nd->root, with obvious
    nasty results once we'd hit that bug enough times to drive the
    refcount of root dentry all the way to zero...

    Signed-off-by: Al Viro

    Al Viro
     
  • Pull cifs fixes from Steve French:
    "SMB3 "validate negotiate" is needed to prevent certain types of
    downgrade attacks.

    Also changes SMB2/SMB3 copy offload from using the BTRFS copy ioctl
    (BTRFS_IOC_CLONE) to a cifs specific ioctl (CIFS_IOC_COPYCHUNK_FILE)
    to address Christoph's comment that there are semantic differences
    between requesting copy offload in which copy-on-write is mandatory
    (as in the BTRFS ioctl) and optional in the SMB2/SMB3 case. Also
    fixes SMB2/SMB3 copychunk for large files"

    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
    [CIFS] Do not use btrfs refcopy ioctl for SMB2 copy offload
    Check SMB3 dialects against downgrade attacks
    Removed duplicated (and unneeded) goto
    CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files

    Linus Torvalds
     

28 Nov, 2013

3 commits

  • Pull driver core fixes from Greg KH:
    "Here are 3 patches for sysfs issues that have been reported. Well, 1
    patch really, the first one is reverted as it's not really needed (the
    correct fix is coming in through the different driver subsystems
    instead)

    But that 1 sysfs fix is needed, so this is still a good thing to pull
    in now"

    Signed-off-by: Greg Kroah-Hartman

    * tag 'driver-core-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    Revert "sysfs: handle duplicate removal attempts in sysfs_remove_group()"
    sysfs: use a separate locking class for open files depending on mmap
    sysfs: handle duplicate removal attempts in sysfs_remove_group()

    Linus Torvalds
     
  • This tool hasn't been maintained in over a decade, and is pretty much
    useless these days. Let's pretend it never happened.

    Also remove a long-dead email address.

    Signed-off-by: Dave Jones
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • This reverts commit 54d71145a4548330313ca664a4a009772fe8b7dd.

    The root cause of these "inverted" sysfs removals have now been found,
    so there is no need for this patch. Keep this functionality around so
    that this type of error doesn't show up in driver code again.

    Cc: Mika Westerberg
    Cc: Rafael J. Wysocki
    Cc: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

27 Nov, 2013

1 commit

  • Pull ceph bug-fixes from Sage Weil:
    "These include a couple fixes to the new fscache code that went in
    during the last cycle (which will need to go stable@ shortly as well),
    a couple client-side directory fragmentation fixes, a fix for a race
    in the cap release queuing path, and a couple race fixes in the
    request abort and resend code.

    Obviously some of this could have gone into 3.12 final, but I
    preferred to overtest rather than send things in for a late -rc, and
    then my travel schedule intervened"

    * 'for-linus-bugs' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    ceph: allocate non-zero page to fscache in readpage()
    ceph: wake up 'safe' waiters when unregistering request
    ceph: cleanup aborted requests when re-sending requests.
    ceph: handle race between cap reconnect and cap release
    ceph: set caps count after composing cap reconnect message
    ceph: queue cap release in __ceph_remove_cap()
    ceph: handle frag mismatch between readdir request and reply
    ceph: remove outdated frag information
    ceph: hung on ceph fscache invalidate in some cases

    Linus Torvalds
     

25 Nov, 2013

2 commits

  • Change cifs.ko to using CIFS_IOCTL_COPYCHUNK instead
    of BTRFS_IOC_CLONE to avoid confusion about whether
    copy-on-write is required or optional for this operation.

    SMB2/SMB3 copyoffload had used the BTRFS_IOC_CLONE ioctl since
    they both speed up copy by offloading the copy rather than
    passing many read and write requests back and forth and both have
    identical syntax (passing file handles), but for SMB2/SMB3
    CopyChunk the server is not required to use copy-on-write
    to make a copy of the file (although some do), and Christoph
    has commented that since CopyChunk does not require
    copy-on-write we should not reuse BTRFS_IOC_CLONE.

    This patch renames the ioctl to use a cifs specific IOCTL
    CIFS_IOCTL_COPYCHUNK. This ioctl is particularly important
    for SMB2/SMB3 since large file copy over the network otherwise
    can be very slow, and with this is often more than 100 times
    faster putting less load on server and client.

    Note that if a copy syscall is ever introduced, depending on
    its requirements/format it could end up using one of the other
    three methods that CIFS/SMB2/SMB3 can do for copy offload,
    but this method is particularly useful for file copy
    and broadly supported (not just by Samba server).

    Signed-off-by: Steve French
    Reviewed-by: Jeff Layton
    Reviewed-by: David Disseldorp

    Steve French
     
  • It was being open coded in a few places.

    Signed-off-by: Kent Overstreet
    Cc: Jens Axboe
    Cc: Joern Engel
    Cc: Prasad Joshi
    Cc: Neil Brown
    Cc: Chris Mason
    Acked-by: NeilBrown
    Signed-off-by: Jens Axboe

    Kent Overstreet
     

24 Nov, 2013

1 commit