Skip to content
  1. Oct 08, 2015
    • Linus Torvalds's avatar
      Merge tag 'fbdev-fixes-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux · e82fa92e
      Linus Torvalds authored
      Pull fbdev fixes from Tomi Valkeinen:
      
       - fbdev: Minor fixes to broadsheetfb, fsl-diu-fb, mb862xxfb, tridentfb,
         omapfb
      
       - display-timing: Fix memory leak in error path
      
      * tag 'fbdev-fixes-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
        video: of: fix memory leak
        fbdev: broadsheetfb: fix memory leak
        OMAPDSS: panel-sony-acx565akm: Export OF module alias information
        fbdev: omap2: connector-dvi: use of_get_i2c_adapter_by_node interface
        tridentfb: Fix set_lwidth on TGUI9440 and CYBER9320
        tridentfb: fix hang on Blade3D with CONFIG_CC_OPTIMIZE_FOR_SIZE
        video: fbdev: mb862xx: Fix module autoload for OF platform driver
        video: fbdev: fsl: Fix the sleep function for FSL DIU module
      e82fa92e
  2. Oct 07, 2015
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 8ace60f8
      Linus Torvalds authored
      Pull regmap fixes from Mark Brown:
       "A couple of fixes for the debugfs information on the register map,
        fixing issues with very small reads potentially causing underflows and
        wraparounds"
      
      * tag 'regmap-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: debugfs: Don't bother actually printing when calculating max length
        regmap: debugfs: Ensure we don't underflow when printing access masks
      8ace60f8
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 07443cec
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A couple of very minor fixes, one for error handling in the Davinci
        driver probe function and another making the Renesas sh-msiof DT
        binding documentation correspond to what's actually implemented"
      
      * tag 'spi-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: sh-msiof: Match renesas,rx-fifo-size in DT bindings doc with driver
        spi: davinci: fix handling platform_get_irq result
      07443cec
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v4.3-rc4' of... · 21f3c961
      Linus Torvalds authored
      Merge tag 'regulator-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "Two fixes here, one device specific fix for axp20x and a core fix for
         cases where one regulator is supplying another which broke probe
        deferral, substituting in a dummy regulator too aggressively"
      
      * tag 'regulator-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: core: Handle probe deferral from DT when resolving supplies
        regulator: axp20x: Fix enable bit indexes for DCDC4 and DCDC5
      21f3c961
    • Sudip Mukherjee's avatar
      video: of: fix memory leak · d663baba
      Sudip Mukherjee authored
      
      
      If of_parse_display_timing() fails we are printing an error message and
      jumping to the error path but we missed freeing "dt".
      
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      d663baba
    • Mark Brown's avatar
    • Linus Torvalds's avatar
      Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 79c7c7ac
      Linus Torvalds authored
      Pull strscpy fixes from Chris Metcalf :
       "This patch series fixes up a couple of architecture issues where
        strscpy wasn't configured correctly (missing on h8300, duplicating
        local and asm-generic copies on powerpc and tile).
      
        It also adds a use of zero_bytemask() to the final store for strscpy
        to avoid writing uninitialized data to the destination.  However, to
        make this work we had to add support for zero_bytemask() to the two
        architectures that didn't have it (alpha and tile), because they were
        providing their own local copies, but didn't provide the
        zero_bytemask() that was previously only required when building with
        CONFIG_DCACHE_WORD_ACCESS"
      
      [ Side note: there is still no actual users of strscpy except for the
        one preexisting use in arch/tile that predates the generic version.
        So this is all about fixing the infrastructure so that we eventually
        can start using it.  - Linus ]
      
      * 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        strscpy: zero any trailing garbage bytes in the destination
        word-at-a-time.h: support zero_bytemask() on alpha and tile
        word-at-a-time.h: fix some Kbuild files
      79c7c7ac
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20151006' of git://git.infradead.org/linux-mtd · 3f5e4a31
      Linus Torvalds authored
      Pull MTD fixes from Brian Norris:
       "A few MTD fixes:
      
         - mxc_nand: a "refactoring only" change in 4.3-rc1 had some bad
           pointer (array) arithmetic.  Fix that
      
         - sunxi_nand:
      
         - Fix an old list manipulation / memory management bug in the device
           release() code path
      
         - Correct a few mistakes in OOB write support"
      
      * tag 'for-linus-20151006' of git://git.infradead.org/linux-mtd:
        mxc_nand: fix copy_spare
        mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
        mtd: nand: sunxi: fix OOB handling in ->write_xxx() functions
      3f5e4a31
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · a0eeb8dd
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfixes:
         - Fix a use-after-free bug in the RPC/RDMA client
         - Fix a write performance regression
         - Fix up page writeback accounting
         - Don't try to reclaim unused state owners
         - Fix a NFSv4 nograce recovery hang
         - reset states to use open_stateid when returning delegation
           voluntarily
         - Fix a tracepoint NULL-pointer dereference"
      
      * tag 'nfs-for-4.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: Fix a tracepoint NULL-pointer dereference
        nfs4: reset states to use open_stateid when returning delegation voluntarily
        NFSv4: Fix a nograce recovery hang
        NFSv4.1: nfs4_opendata_check_deleg needs to handle NFS4_OPEN_CLAIM_DELEG_CUR_FH
        NFSv4: Don't try to reclaim unused state owners
        NFS: Fix a write performance regression
        NFS: Fix up page writeback accounting
        xprtrdma: disconnect and flush cqs before freeing buffers
      a0eeb8dd
    • Linus Torvalds's avatar
      Revert "fs: do not prefault sys_write() user buffer pages" · 00a3d660
      Linus Torvalds authored
      This reverts commit 998ef75d
      
      .
      
      The commit itself does not appear to be buggy per se, but it is exposing
      a bug in ext4 (and Ted thinks ext3 too, but we solved that by getting
      rid of it).  It's too late in the release cycle to really worry about
      this, even if Dave Hansen has a patch that may actually fix the
      underlying ext4 problem.  We can (and should) revisit this for the next
      release.
      
      The problem is that moving the prefaulting later now exposes a special
      case with partially successful writes that isn't handled correctly.  And
      the prefaulting likely isn't normally even that much of a performance
      issue - it looks like at least one reason Dave saw this in his
      performance tests is that he also ran them on Skylake that now supports
      the new SMAP code, which makes the normally very cheap user space
      prefaulting noticeably more expensive.
      
      Bisected-and-acked-by: default avatarTed Ts'o <tytso@mit.edu>
      Analyzed-and-acked-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      00a3d660
    • Anna Schumaker's avatar
      NFS: Fix a tracepoint NULL-pointer dereference · 39d0d3bd
      Anna Schumaker authored
      
      
      Running xfstest generic/013 with the tracepoint nfs:nfs4_open_file
      enabled produces a NULL-pointer dereference when calculating fileid and
      filehandle of the opened file.  Fix this by checking if state is NULL
      before trying to use the inode pointer.
      
      Reported-by: default avatarOlga Kornievskaia <aglo@umich.edu>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      39d0d3bd
    • Chris Metcalf's avatar
      strscpy: zero any trailing garbage bytes in the destination · 990486c8
      Chris Metcalf authored
      
      
      It's possible that the destination can be shadowed in userspace
      (as, for example, the perf buffers are now).  So we should take
      care not to leak data that could be inspected by userspace.
      
      Signed-off-by: default avatarChris Metcalf <cmetcalf@ezchip.com>
      990486c8
    • Chris Metcalf's avatar
      word-at-a-time.h: support zero_bytemask() on alpha and tile · c753bf34
      Chris Metcalf authored
      
      
      Both alpha and tile needed implementations of zero_bytemask.
      
      The alpha version is untested.
      
      Signed-off-by: default avatarChris Metcalf <cmetcalf@ezchip.com>
      c753bf34
    • Chris Metcalf's avatar
      word-at-a-time.h: fix some Kbuild files · 19c22f3a
      Chris Metcalf authored
      
      
      arch/tile added word-at-a-time.h after the patch that added generic-y
      entries; the generic-y entry is now stale.
      
      arch/h8300 is newer than the generic-y patch for word-at-a-time.h,
      and needs a generic-y entry.
      
      arch/powerpc seems to have gotten a generic-y entry by mistake in
      the first patch; this change removes it.
      
      Signed-off-by: default avatarChris Metcalf <cmetcalf@ezchip.com>
      19c22f3a
  3. Oct 06, 2015
  4. Oct 04, 2015
    • Linus Torvalds's avatar
      Linux 4.3-rc4 · 049e6dde
      Linus Torvalds authored
      049e6dde
    • Linus Torvalds's avatar
      Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 30c44659
      Linus Torvalds authored
      Pull strscpy string copy function implementation from Chris Metcalf.
      
      Chris sent this during the merge window, but I waffled back and forth on
      the pull request, which is why it's going in only now.
      
      The new "strscpy()" function is definitely easier to use and more secure
      than either strncpy() or strlcpy(), both of which are horrible nasty
      interfaces that have serious and irredeemable problems.
      
      strncpy() has a useless return value, and doesn't NUL-terminate an
      overlong result.  To make matters worse, it pads a short result with
      zeroes, which is a performance disaster if you have big buffers.
      
      strlcpy(), by contrast, is a mis-designed "fix" for strlcpy(), lacking
      the insane NUL padding, but having a differently broken return value
      which returns the original length of the source string.  Which means
      that it will read characters past the count from the source buffer, and
      you have to trust the source to be properly terminated.  It also makes
      error handling fragile, since the test for overflow is unnecessarily
      subtle.
      
      strscpy() avoids both these problems, guaranteeing the NUL termination
      (but not excessive padding) if the destination size wasn't zero, and
      making the overflow condition very obvious by returning -E2BIG.  It also
      doesn't read past the size of the source, and can thus be used for
      untrusted source data too.
      
      So why did I waffle about this for so long?
      
      Every time we introduce a new-and-improved interface, people start doing
      these interminable series of trivial conversion patches.
      
      And every time that happens, somebody does some silly mistake, and the
      conversion patch to the improved interface actually makes things worse.
      Because the patch is mindnumbing and trivial, nobody has the attention
      span to look at it carefully, and it's usually done over large swatches
      of source code which means that not every conversion gets tested.
      
      So I'm pulling the strscpy() support because it *is* a better interface.
      But I will refuse to pull mindless conversion patches.  Use this in
      places where it makes sense, but don't do trivial patches to fix things
      that aren't actually known to be broken.
      
      * 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        tile: use global strscpy() rather than private copy
        string: provide strscpy()
        Make asm/word-at-a-time.h available on all architectures
      30c44659
    • Linus Torvalds's avatar
      Merge tag 'md/4.3-fixes' of git://neil.brown.name/md · 15ecf9a9
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Assorted fixes for md in 4.3-rc.
      
        Two tagged for -stable, and one is really a cleanup to match and
        improve kmemcache interface.
      
      * tag 'md/4.3-fixes' of git://neil.brown.name/md:
        md/bitmap: don't pass -1 to bitmap_storage_alloc.
        md/raid1: Avoid raid1 resync getting stuck
        md: drop null test before destroy functions
        md: clear CHANGE_PENDING in readonly array
        md/raid0: apply base queue limits *before* disk_stack_limits
        md/raid5: don't index beyond end of array in need_this_block().
        raid5: update analysis state for failed stripe
        md: wait for pending superblock updates before switching to read-only
      15ecf9a9
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 0d877081
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "This week's round of MIPS fixes:
         - Fix JZ4740 build
         - Fix fallback to GFP_DMA
         - FP seccomp in case of ENOSYS
         - Fix bootmem panic
         - A number of FP and CPS fixes
         - Wire up new syscalls
         - Make sure BPF assembler objects can properly be disassembled
         - Fix BPF assembler code for MIPS I"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: scall: Always run the seccomp syscall filters
        MIPS: Octeon: Fix kernel panic on startup from memory corruption
        MIPS: Fix R2300 FP context switch handling
        MIPS: Fix octeon FP context switch handling
        MIPS: BPF: Fix load delay slots.
        MIPS: BPF: Do all exports of symbols with FEXPORT().
        MIPS: Fix the build on jz4740 after removing the custom gpio.h
        MIPS: CPS: #ifdef on CONFIG_MIPS_MT_SMP rather than CONFIG_MIPS_MT
        MIPS: CPS: Don't include MT code in non-MT kernels.
        MIPS: CPS: Stop dangling delay slot from has_mt.
        MIPS: dma-default: Fix 32-bit fall back to GFP_DMA
        MIPS: Wire up userfaultfd and membarrier syscalls.
      0d877081
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3e519dde
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "This update contains:
      
         - Fix for a long standing race affecting /proc/irq/NNN
      
         - One line fix for ARM GICV3-ITS counting the wrong data
      
         - Warning silencing in ARM GICV3-ITS.  Another GCC trying to be
           overly clever issue"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic-v3-its: Count additional LPIs for the aliased devices
        irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined
        genirq: Fix race in register_irq_proc()
      3e519dde
    • Markos Chandras's avatar
      MIPS: scall: Always run the seccomp syscall filters · d218af78
      Markos Chandras authored
      
      
      The MIPS syscall handler code used to return -ENOSYS on invalid
      syscalls. Whilst this is expected, it caused problems for seccomp
      filters because the said filters never had the change to run since
      the code returned -ENOSYS before triggering them. This caused
      problems on the chromium testsuite for filters looking for invalid
      syscalls. This has now changed and the seccomp filters are always
      run even if the syscall is invalid. We return -ENOSYS once we
      return from the seccomp filters. Moreover, similar codepaths have
      been merged in the process which simplifies somewhat the overall
      syscall code.
      
      Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11236/
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      d218af78
    • Steve French's avatar
      [CIFS] Update cifs version number · 616a5399
      Steve French authored
      
      
      Update modinfo cifs.ko version number to 2.08
      
      Signed-off-by: default avatarSteve French <steve.french@primarydata.com>
      616a5399
  5. Oct 03, 2015
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2cf30826
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fixes all around the map: W+X kernel mapping fix, WCHAN fixes, two
        build failure fixes for corner case configs, x32 header fix and a
        speling fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds
        x86/mm: Set NX on gap between __ex_table and rodata
        x86/kexec: Fix kexec crash in syscall kexec_file_load()
        x86/process: Unify 32bit and 64bit implementations of get_wchan()
        x86/process: Add proper bound checks in 64bit get_wchan()
        x86, efi, kasan: Fix build failure on !KASAN && KMEMCHECK=y kernels
        x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case
        x86/cpufeatures: Correct spelling of the HWP_NOTIFY flag
      2cf30826
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 37cc7ab1
      Linus Torvalds authored
      Pull timer fixes from Ingo Molnar:
       "An abs64() fix in the watchdog driver, and two clocksource driver
        NO_IRQ assumption fixes"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Fix abs() usage w/ 64bit values
        clocksource/drivers/keystone: Fix bad NO_IRQ usage
        clocksource/drivers/rockchip: Fix bad NO_IRQ usage
      37cc7ab1
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a758379b
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "Two EFI fixes: one for x86, one for ARM, fixing a boot crash bug that
        can trigger under newer EFI firmware"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        arm64/efi: Fix boot crash by not padding between EFI_MEMORY_RUNTIME regions
        x86/efi: Fix boot crash by mapping EFI memmap entries bottom-up at runtime, instead of top-down
      a758379b
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 14f97d97
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Bunch of fixes all over the place, all pretty small: amdgpu, i915,
        exynos, one qxl and one vmwgfx.
      
        There is also a bunch of mst fixes, I left some cleanups in the series
        as I didn't think it was worth splitting up the tested series"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (37 commits)
        drm/dp/mst: add some defines for logical/physical ports
        drm/dp/mst: drop cancel work sync in the mstb destroy path (v2)
        drm/dp/mst: split connector registration into two parts (v2)
        drm/dp/mst: update the link_address_sent before sending the link address (v3)
        drm/dp/mst: fixup handling hotplug on port removal.
        drm/dp/mst: don't pass port into the path builder function
        drm/radeon: drop radeon_fb_helper_set_par
        drm: handle cursor_set2 in restore_fbdev_mode
        drm/exynos: Staticize local function in exynos_drm_gem.c
        drm/exynos: fimd: actually disable dp clock
        drm/exynos: dp: remove suspend/resume functions
        drm/qxl: recreate the primary surface when the bo is not primary
        drm/amdgpu: only print meaningful VM faults
        drm/amdgpu/cgs: remove import_gpu_mem
        drm/i915: Call non-locking version of drm_kms_helper_poll_enable(), v2
        drm: Add a non-locking version of drm_kms_helper_poll_enable(), v2
        drm/vmwgfx: Fix a command submission hang regression
        drm/exynos: remove unused mode_fixup() code
        drm/exynos: remove decon_mode_fixup()
        drm/exynos: remove fimd_mode_fixup()
        ...
      14f97d97
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 978ab6a0
      Linus Torvalds authored
      Pull input layer fixes from Dmitry Torokhov:
       "Fixes for two recent regressions (in Synaptics PS/2 and uinput
        drivers) and some more driver fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Revert "Input: synaptics - fix handling of disabling gesture mode"
        Input: psmouse - fix data race in __ps2_command
        Input: elan_i2c - add all valid ic type for i2c/smbus
        Input: zhenhua - ensure we have BITREVERSE
        Input: omap4-keypad - fix memory leak
        Input: serio - fix blocking of parport
        Input: uinput - fix crash when using ABS events
        Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
        Input: elan_i2c - add ic type 0x03
        Input: elan_i2c - don't require known iap version
        Input: imx6ul_tsc - fix controller name
        Input: imx6ul_tsc - use the preferred method for kzalloc()
        Input: imx6ul_tsc - check for negative return value
        Input: imx6ul_tsc - propagate the errors
        Input: walkera0701 - fix abs() calculations on 64 bit values
        Input: mms114 - remove unneded semicolons
        Input: pm8941-pwrkey - remove unneded semicolon
        Input: fix typo in MT documentation
        Input: cyapa - fix address of Gen3 devices in device tree documentation
      978ab6a0
    • John Stultz's avatar
      clocksource: Fix abs() usage w/ 64bit values · 67dfae0c
      John Stultz authored
      
      
      This patch fixes one cases where abs() was being used with 64-bit
      nanosecond values, where the result may be capped at 32-bits.
      
      This potentially could cause watchdog false negatives on 32-bit
      systems, so this patch addresses the issue by using abs64().
      
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1442279124-7309-2-git-send-email-john.stultz@linaro.org
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      67dfae0c
    • Trond Myklebust's avatar
      Merge tag 'nfs-rdma-for-4.3-2' of git://git.linux-nfs.org/projects/anna/nfs-rdma · 8dbb0957
      Trond Myklebust authored
      
      
      NFS: NFSoRDMA bugfix
      
      Fixes a use-after-free bug.
      
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@netapp.com>
      8dbb0957
    • Jeff Layton's avatar
      nfs4: reset states to use open_stateid when returning delegation voluntarily · 5e99b532
      Jeff Layton authored
      
      
      When the client goes to return a delegation, it should always update any
      nfs4_state currently set up to use that delegation stateid to instead
      use the open stateid. It already does do this in some cases,
      particularly in the state recovery code, but not currently when the
      delegation is voluntarily returned (e.g. in advance of a RENAME).  This
      causes the client to try to continue using the delegation stateid after
      the DELEGRETURN, e.g. in LAYOUTGET.
      
      Set the nfs4_state back to using the open stateid in
      nfs4_open_delegation_recall, just before clearing the
      NFS_DELEGATED_STATE bit.
      
      Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      5e99b532
    • Benjamin Coddington's avatar
      NFSv4: Fix a nograce recovery hang · e92c1e0d
      Benjamin Coddington authored
      Since commit 5cae02f4
      
       an OPEN_CONFIRM should
      have a privileged sequence in the recovery case to allow nograce recovery to
      proceed for NFSv4.0.
      
      Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      e92c1e0d
    • Trond Myklebust's avatar
      NFSv4.1: nfs4_opendata_check_deleg needs to handle NFS4_OPEN_CLAIM_DELEG_CUR_FH · 72d79ff8
      Trond Myklebust authored
      
      
      We need to warn against broken NFSv4.1 servers that try to hand out
      delegations in response to NFS4_OPEN_CLAIM_DELEG_CUR_FH.
      
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      72d79ff8
    • Trond Myklebust's avatar
      NFSv4: Don't try to reclaim unused state owners · 4a0954ef
      Trond Myklebust authored
      
      
      Currently, we don't test if the state owner is in use before we try to
      recover it. The problem is that if the refcount is zero, then the
      state owner will be waiting on the lru list for garbage collection.
      The expectation in that case is that if you bump the refcount, then
      you must also remove the state owner from the lru list. Otherwise
      the call to nfs4_put_state_owner will corrupt that list by trying
      to add our state owner a second time.
      
      Avoid the whole problem by just skipping state owners that hold no
      state.
      
      Reported-by: default avatarAndrew W Elble <aweits@rit.edu>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      4a0954ef
    • Trond Myklebust's avatar
      NFS: Fix a write performance regression · 8fa4592a
      Trond Myklebust authored
      If all other conditions in nfs_can_extend_write() are met, and there
      are no locks, then we should be able to assume close-to-open semantics
      and the ability to extend our write to cover the whole page.
      
      With this patch, the xfstests generic/074 test completes in 242s instead
      of >1400s on my test rig.
      
      Fixes: bd61e0a9
      
       ("locks: convert posix locks to file_lock_context")
      Cc: Jeff Layton <jlayton@primarydata.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      8fa4592a
    • Trond Myklebust's avatar
      NFS: Fix up page writeback accounting · 40f90271
      Trond Myklebust authored
      
      
      Currently, we are crediting all the calls to nfs_writepages_callback()
      (i.e. the nfs_writepages() callback) to nfs_writepage(). Aside from
      being inconsistent with the behaviour of the equivalent readpage/readpages
      accounting, this also means that we cannot distinguish between bulk writes
      and single page writebacks (which confuses the 'nfsiostat -p' tool).
      
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      40f90271