Merge tag 'xfs-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Oct 2016 15:18:10 +0000 (08:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Oct 2016 15:18:10 +0000 (08:18 -0700)
Pull xfs and iomap updates from Dave Chinner:
 "The main things in this update are the iomap-based DAX infrastructure,
  an XFS delalloc rework, and a chunk of fixes to how log recovery
  schedules writeback to prevent spurious corruption detections when
  recovery of certain items was not required.

  The other main chunk of code is some preparation for the upcoming
  reflink functionality. Most of it is generic and cleanups that stand
  alone, but they were ready and reviewed so are in this pull request.

  Speaking of reflink, I'm currently planning to send you another pull
  request next week containing all the new reflink functionality. I'm
  working through a similar process to the last cycle, where I sent the
  reverse mapping code in a separate request because of how large it
  was. The reflink code merge is even bigger than reverse mapping, so
  I'll be doing the same thing again....

  Summary for this update:

   - change of XFS mailing list to linux-xfs@vger.kernel.org

   - iomap-based DAX infrastructure w/ XFS and ext2 support

   - small iomap fixes and additions

   - more efficient XFS delayed allocation infrastructure based on iomap

   - a rework of log recovery writeback scheduling to ensure we don't
     fail recovery when trying to replay items that are already on disk

   - some preparation patches for upcoming reflink support

   - configurable error handling fixes and documentation

   - aio access time update race fixes for XFS and
     generic_file_read_iter"

* tag 'xfs-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (40 commits)
  fs: update atime before I/O in generic_file_read_iter
  xfs: update atime before I/O in xfs_file_dio_aio_read
  ext2: fix possible integer truncation in ext2_iomap_begin
  xfs: log recovery tracepoints to track current lsn and buffer submission
  xfs: update metadata LSN in buffers during log recovery
  xfs: don't warn on buffers not being recovered due to LSN
  xfs: pass current lsn to log recovery buffer validation
  xfs: rework log recovery to submit buffers on LSN boundaries
  xfs: quiesce the filesystem after recovery on readonly mount
  xfs: remote attribute blocks aren't really userdata
  ext2: use iomap to implement DAX
  ext2: stop passing buffer_head to ext2_get_blocks
  xfs: use iomap to implement DAX
  xfs: refactor xfs_setfilesize
  xfs: take the ilock shared if possible in xfs_file_iomap_begin
  xfs: fix locking for DAX writes
  dax: provide an iomap based fault handler
  dax: provide an iomap based dax read/write path
  dax: don't pass buffer_head to copy_user_dax
  dax: don't pass buffer_head to dax_insert_mapping
  ...

1  2 
MAINTAINERS
fs/ext2/inode.c
mm/filemap.c

diff --combined MAINTAINERS
@@@ -636,15 -636,6 +636,15 @@@ F:       drivers/tty/serial/altera_jtaguart.
  F:    include/linux/altera_uart.h
  F:    include/linux/altera_jtaguart.h
  
 +AMAZON ETHERNET DRIVERS
 +M:    Netanel Belgazal <netanel@annapurnalabs.com>
 +R:    Saeed Bishara <saeed@annapurnalabs.com>
 +R:    Zorik Machulsky <zorik@annapurnalabs.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    Documentation/networking/ena.txt
 +F:    drivers/net/ethernet/amazon/
 +
  AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER
  M:    Tom Lendacky <thomas.lendacky@amd.com>
  M:    Gary Hook <gary.hook@amd.com>
@@@ -807,7 -798,6 +807,7 @@@ M: Laura Abbott <labbott@redhat.com
  M:    Sumit Semwal <sumit.semwal@linaro.org>
  L:    devel@driverdev.osuosl.org
  S:    Supported
 +F:    Documentation/devicetree/bindings/staging/ion/
  F:    drivers/staging/android/ion
  F:    drivers/staging/android/uapi/ion.h
  F:    drivers/staging/android/uapi/ion_test.h
@@@ -819,11 -809,11 +819,11 @@@ L:      alsa-devel@alsa-project.org (moderat
  S:    Maintained
  F:    sound/aoa/
  
 -APEX EMBEDDED SYSTEMS STX104 DAC DRIVER
 +APEX EMBEDDED SYSTEMS STX104 IIO DRIVER
  M:    William Breathitt Gray <vilhelm.gray@gmail.com>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
 -F:    drivers/iio/dac/stx104.c
 +F:    drivers/iio/adc/stx104.c
  
  APM DRIVER
  M:    Jiri Kosina <jikos@kernel.org>
@@@ -891,15 -881,6 +891,15 @@@ S:       Supporte
  F:    drivers/gpu/drm/arc/
  F:    Documentation/devicetree/bindings/display/snps,arcpgu.txt
  
 +ARM ARCHITECTED TIMER DRIVER
 +M:    Mark Rutland <mark.rutland@arm.com>
 +M:    Marc Zyngier <marc.zyngier@arm.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/include/asm/arch_timer.h
 +F:    arch/arm64/include/asm/arch_timer.h
 +F:    drivers/clocksource/arm_arch_timer.c
 +
  ARM HDLCD DRM DRIVER
  M:    Liviu Dudau <liviu.dudau@arm.com>
  S:    Supported
@@@ -922,17 -903,15 +922,17 @@@ F:      arch/arm/include/asm/floppy.
  
  ARM PMU PROFILING AND DEBUGGING
  M:    Will Deacon <will.deacon@arm.com>
 -R:    Mark Rutland <mark.rutland@arm.com>
 +M:    Mark Rutland <mark.rutland@arm.com>
  S:    Maintained
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  F:    arch/arm*/kernel/perf_*
  F:    arch/arm/oprofile/common.c
  F:    arch/arm*/kernel/hw_breakpoint.c
  F:    arch/arm*/include/asm/hw_breakpoint.h
  F:    arch/arm*/include/asm/perf_event.h
 -F:    drivers/perf/arm_pmu.c
 +F:    drivers/perf/*
  F:    include/linux/perf/arm_pmu.h
 +F:    Documentation/devicetree/bindings/arm/pmu.txt
  
  ARM PORT
  M:    Russell King <linux@armlinux.org.uk>
@@@ -1134,11 -1113,6 +1134,11 @@@ F:    drivers/hwtracing/coresight/
  F:    Documentation/trace/coresight.txt
  F:    Documentation/devicetree/bindings/arm/coresight.txt
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
 +F:    tools/perf/arch/arm/util/pmu.c
 +F:    tools/perf/arch/arm/util/auxtrace.c
 +F:    tools/perf/arch/arm/util/cs-etm.c
 +F:    tools/perf/arch/arm/util/cs-etm.h
 +F:    tools/perf/util/cs-etm.h
  
  ARM/CORGI MACHINE SUPPORT
  M:    Richard Purdie <rpurdie@rpsys.net>
@@@ -1640,8 -1614,7 +1640,8 @@@ N:      rockchi
  
  ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
  M:    Kukjin Kim <kgene@kernel.org>
 -M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
 +R:    Javier Martinez Canillas <javier@osg.samsung.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  S:    Maintained
@@@ -1661,6 -1634,7 +1661,6 @@@ F:      drivers/*/*s3c64xx
  F:    drivers/*/*s5pv210*
  F:    drivers/memory/samsung/*
  F:    drivers/soc/samsung/*
 -F:    drivers/spi/spi-s3c*
  F:    Documentation/arm/Samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
  F:    Documentation/devicetree/bindings/sram/samsung-sram.txt
@@@ -1848,7 -1822,6 +1848,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  ARM/UNIPHIER ARCHITECTURE
  M:    Masahiro Yamada <yamada.masahiro@socionext.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier.git
  S:    Maintained
  F:    arch/arm/boot/dts/uniphier*
  F:    arch/arm/include/asm/hardware/cache-uniphier.h
@@@ -1856,7 -1829,6 +1856,7 @@@ F:      arch/arm/mach-uniphier
  F:    arch/arm/mm/cache-uniphier.c
  F:    arch/arm64/boot/dts/socionext/
  F:    drivers/bus/uniphier-system-bus.c
 +F:    drivers/clk/uniphier/
  F:    drivers/i2c/busses/i2c-uniphier*
  F:    drivers/pinctrl/uniphier/
  F:    drivers/tty/serial/8250/8250_uniphier.c
@@@ -1993,13 -1965,6 +1993,13 @@@ S:    Maintaine
  F:    drivers/media/i2c/as3645a.c
  F:    include/media/i2c/as3645a.h
  
 +ASAHI KASEI AK8974 DRIVER
 +M:    Linus Walleij <linus.walleij@linaro.org>
 +L:    linux-iio@vger.kernel.org
 +W:    http://www.akm.com/
 +S:    Supported
 +F:    drivers/iio/magnetometer/ak8974.c
 +
  ASC7621 HARDWARE MONITOR DRIVER
  M:    George Joseph <george.joseph@fairview5.com>
  L:    linux-hwmon@vger.kernel.org
@@@ -2138,6 -2103,11 +2138,6 @@@ M:     Ludovic Desroches <ludovic.desroches
  S:    Maintained
  F:    drivers/mmc/host/atmel-mci.c
  
 -ATMEL AT91 / AT32 SERIAL DRIVER
 -M:    Nicolas Ferre <nicolas.ferre@atmel.com>
 -S:    Supported
 -F:    drivers/tty/serial/atmel_serial.c
 -
  ATMEL AT91 SAMA5D2-Compatible Shutdown Controller
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  S:    Supported
@@@ -2505,7 -2475,7 +2505,7 @@@ F:      include/net/bluetooth
  BONDING DRIVER
  M:    Jay Vosburgh <j.vosburgh@gmail.com>
  M:    Veaceslav Falico <vfalico@gmail.com>
 -M:    Andy Gospodarek <gospo@cumulusnetworks.com>
 +M:    Andy Gospodarek <andy@greyhouse.net>
  L:    netdev@vger.kernel.org
  W:    http://sourceforge.net/projects/bonding/
  S:    Supported
@@@ -2520,7 -2490,7 +2520,7 @@@ S:      Supporte
  F:    kernel/bpf/
  
  BROADCOM B44 10/100 ETHERNET DRIVER
 -M:    Gary Zambrano <zambrano@broadcom.com>
 +M:    Michael Chan <michael.chan@broadcom.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/broadcom/b44.*
@@@ -3155,7 -3125,7 +3155,7 @@@ L:      cocci@systeme.lip6.fr (moderated fo
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild.git misc
  W:    http://coccinelle.lip6.fr/
  S:    Supported
 -F:    Documentation/coccinelle.txt
 +F:    Documentation/dev-tools/coccinelle.rst
  F:    scripts/coccinelle/
  F:    scripts/coccicheck
  
@@@ -3181,7 -3151,6 +3181,7 @@@ COMMON CLK FRAMEWOR
  M:    Michael Turquette <mturquette@baylibre.com>
  M:    Stephen Boyd <sboyd@codeaurora.org>
  L:    linux-clk@vger.kernel.org
 +Q:    http://patchwork.kernel.org/project/linux-clk/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
  S:    Maintained
  F:    Documentation/devicetree/bindings/clock/
@@@ -3269,7 -3238,7 +3269,7 @@@ F:      kernel/cpuset.
  CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
  M:    Johannes Weiner <hannes@cmpxchg.org>
  M:    Michal Hocko <mhocko@kernel.org>
 -M:    Vladimir Davydov <vdavydov@virtuozzo.com>
 +M:    Vladimir Davydov <vdavydov.dev@gmail.com>
  L:    cgroups@vger.kernel.org
  L:    linux-mm@kvack.org
  S:    Maintained
@@@ -3290,7 -3259,7 +3290,7 @@@ S:      Maintaine
  F:    drivers/net/wan/cosa*
  
  CPMAC ETHERNET DRIVER
 -M:    Florian Fainelli <florian@openwrt.org>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/ti/cpmac.c
@@@ -3302,7 -3271,6 +3302,7 @@@ L:      linux-pm@vger.kernel.or
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
  T:    git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
 +F:    Documentation/cpu-freq/
  F:    drivers/cpufreq/
  F:    include/linux/cpufreq.h
  
@@@ -3801,12 -3769,6 +3801,12 @@@ F:    include/linux/regulator/da9211.
  F:    include/sound/da[79]*.h
  F:    sound/soc/codecs/da[79]*.[ch]
  
 +DIAMOND SYSTEMS GPIO-MM GPIO DRIVER
 +M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-gpio-mm.c
 +
  DIGI NEO AND CLASSIC PCI PRODUCTS
  M:    Lidza Louina <lidza.louina@gmail.com>
  M:    Mark Hounschell <markh@compro.net>
@@@ -4432,6 -4394,7 +4432,6 @@@ F:      Documentation/filesystems/ecryptfs.t
  F:    fs/ecryptfs/
  
  EDAC-CORE
 -M:    Doug Thompson <dougthompson@xmission.com>
  M:    Borislav Petkov <bp@alien8.de>
  M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
@@@ -4444,12 -4407,14 +4444,12 @@@ F:   drivers/edac
  F:    include/linux/edac.h
  
  EDAC-AMD64
 -M:    Doug Thompson <dougthompson@xmission.com>
  M:    Borislav Petkov <bp@alien8.de>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/amd64_edac*
  
  EDAC-CALXEDA
 -M:    Doug Thompson <dougthompson@xmission.com>
  M:    Robert Richter <rric@kernel.org>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
@@@ -4465,21 -4430,17 +4465,21 @@@ F:   drivers/edac/octeon_edac
  
  EDAC-E752X
  M:    Mark Gross <mark.gross@intel.com>
 -M:    Doug Thompson <dougthompson@xmission.com>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/e752x_edac.c
  
  EDAC-E7XXX
 -M:    Doug Thompson <dougthompson@xmission.com>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/e7xxx_edac.c
  
 +EDAC-FSL_DDR
 +M:    York Sun <york.sun@nxp.com>
 +L:    linux-edac@vger.kernel.org
 +S:    Maintained
 +F:    drivers/edac/fsl_ddr_edac.*
 +
  EDAC-GHES
  M:    Mauro Carvalho Chehab <mchehab@s-opensource.com>
  M:    Mauro Carvalho Chehab <mchehab@kernel.org>
@@@ -4494,11 -4455,13 +4494,11 @@@ S:   Maintaine
  F:    drivers/edac/i82443bxgx_edac.c
  
  EDAC-I3000
 -M:    Jason Uhlenkott <juhlenko@akamai.com>
  L:    linux-edac@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/edac/i3000_edac.c
  
  EDAC-I5000
 -M:    Doug Thompson <dougthompson@xmission.com>
  L:    linux-edac@vger.kernel.org
  S:    Maintained
  F:    drivers/edac/i5000_edac.c
@@@ -4562,12 -4525,6 +4562,12 @@@ L:    linux-edac@vger.kernel.or
  S:    Maintained
  F:    drivers/edac/sb_edac.c
  
 +EDAC-SKYLAKE
 +M:    Tony Luck <tony.luck@intel.com>
 +L:    linux-edac@vger.kernel.org
 +S:    Maintained
 +F:    drivers/edac/skx_edac.c
 +
  EDAC-XGENE
  APPLIED MICRO (APM) X-GENE SOC EDAC
  M:     Loc Ho <lho@apm.com>
@@@ -4610,13 -4567,6 +4610,13 @@@ M:    Peter Jones <pjones@redhat.com
  S:    Maintained
  F:    drivers/video/fbdev/efifb.c
  
 +EFI TEST DRIVER
 +L:    linux-efi@vger.kernel.org
 +M:    Ivan Hu <ivan.hu@canonical.com>
 +M:    Matt Fleming <matt@codeblueprint.co.uk>
 +S:    Maintained
 +F:    drivers/firmware/efi/test/
 +
  EFS FILESYSTEM
  W:    http://aeschi.ch.eu.org/efs/
  S:    Orphan
@@@ -4884,7 -4834,6 +4884,7 @@@ F:      tools/firewire
  
  FIRMWARE LOADER (request_firmware)
  M:    Ming Lei <ming.lei@canonical.com>
 +M:    Luis R. Rodriguez <mcgrof@kernel.org>
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  F:    Documentation/firmware_class/
@@@ -5170,7 -5119,7 +5170,7 @@@ GCOV BASED KERNEL PROFILIN
  M:    Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
  S:    Maintained
  F:    kernel/gcov/
 -F:    Documentation/gcov.txt
 +F:    Documentation/dev-tools/gcov.rst
  
  GDT SCSI DISK ARRAY CONTROLLER DRIVER
  M:    Achim Leubner <achim_leubner@adaptec.com>
@@@ -5287,13 -5236,6 +5287,13 @@@ L:    linux-input@vger.kernel.or
  S:    Maintained
  F:    drivers/input/touchscreen/goodix.c
  
 +GPIO MOCKUP DRIVER
 +M:    Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-mockup.c
 +F:    tools/testing/selftests/gpio/
 +
  GPIO SUBSYSTEM
  M:    Linus Walleij <linus.walleij@linaro.org>
  M:    Alexandre Courbot <gnurou@gmail.com>
@@@ -5325,77 -5267,6 +5325,77 @@@ L:    netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/aeroflex/
  
 +GREYBUS SUBSYSTEM
 +M:    Johan Hovold <johan@kernel.org>
 +M:    Alex Elder <elder@kernel.org>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +S:    Maintained
 +F:    drivers/staging/greybus/
 +
 +GREYBUS AUDIO PROTOCOLS DRIVERS
 +M:    Vaibhav Agarwal <vaibhav.sr@gmail.com>
 +M:    Mark Greer <mgreer@animalcreek.com>
 +S:    Maintained
 +F:    drivers/staging/greybus/audio_apbridgea.c
 +F:    drivers/staging/greybus/audio_apbridgea.h
 +F:    drivers/staging/greybus/audio_codec.c
 +F:    drivers/staging/greybus/audio_codec.h
 +F:    drivers/staging/greybus/audio_gb.c
 +F:    drivers/staging/greybus/audio_manager.c
 +F:    drivers/staging/greybus/audio_manager.h
 +F:    drivers/staging/greybus/audio_manager_module.c
 +F:    drivers/staging/greybus/audio_manager_private.h
 +F:    drivers/staging/greybus/audio_manager_sysfs.c
 +F:    drivers/staging/greybus/audio_module.c
 +F:    drivers/staging/greybus/audio_topology.c
 +
 +GREYBUS PROTOCOLS DRIVERS
 +M:    Rui Miguel Silva <rmfrfs@gmail.com>
 +S:    Maintained
 +F:    drivers/staging/greybus/sdio.c
 +F:    drivers/staging/greybus/light.c
 +F:    drivers/staging/greybus/gpio.c
 +F:    drivers/staging/greybus/power_supply.c
 +F:    drivers/staging/greybus/spi.c
 +F:    drivers/staging/greybus/spilib.c
 +
 +GREYBUS PROTOCOLS DRIVERS
 +M:    Bryan O'Donoghue <pure.logic@nexus-software.ie>
 +S:    Maintained
 +F:    drivers/staging/greybus/loopback.c
 +F:    drivers/staging/greybus/timesync.c
 +F:    drivers/staging/greybus/timesync_platform.c
 +
 +GREYBUS PROTOCOLS DRIVERS
 +M:    Viresh Kumar <vireshk@kernel.org>
 +S:    Maintained
 +F:    drivers/staging/greybus/authentication.c
 +F:    drivers/staging/greybus/bootrom.c
 +F:    drivers/staging/greybus/firmware.h
 +F:    drivers/staging/greybus/fw-core.c
 +F:    drivers/staging/greybus/fw-download.c
 +F:    drivers/staging/greybus/fw-managament.c
 +F:    drivers/staging/greybus/greybus_authentication.h
 +F:    drivers/staging/greybus/greybus_firmware.h
 +F:    drivers/staging/greybus/hid.c
 +F:    drivers/staging/greybus/i2c.c
 +F:    drivers/staging/greybus/spi.c
 +F:    drivers/staging/greybus/spilib.c
 +F:    drivers/staging/greybus/spilib.h
 +
 +GREYBUS PROTOCOLS DRIVERS
 +M:    David Lin <dtwlin@gmail.com>
 +S:    Maintained
 +F:    drivers/staging/greybus/uart.c
 +F:    drivers/staging/greybus/log.c
 +
 +GREYBUS PLATFORM DRIVERS
 +M:    Vaibhav Hiremath <hvaibhav.linux@gmail.com>
 +S:    Maintained
 +F:    drivers/staging/greybus/arche-platform.c
 +F:    drivers/staging/greybus/arche-apb-ctrl.c
 +F:    drivers/staging/greybus/arche_platform.h
 +
  GSPCA FINEPIX SUBDRIVER
  M:    Frank Zago <frank@zago.net>
  L:    linux-media@vger.kernel.org
@@@ -5696,9 -5567,10 +5696,9 @@@ F:     Documentation/devicetree/bindings/sc
  
  HOST AP DRIVER
  M:    Jouni Malinen <j@w1.fi>
 -L:    hostap@shmoo.com (subscribers-only)
  L:    linux-wireless@vger.kernel.org
 -W:    http://hostap.epitest.fi/
 -S:    Maintained
 +W:    http://w1.fi/hostap-driver.html
 +S:    Obsolete
  F:    drivers/net/wireless/intersil/hostap/
  
  HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
@@@ -5735,7 -5607,7 +5735,7 @@@ M:      Sebastian Reichel <sre@kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-hsi
 -F:    Documentation/hsi.txt
 +F:    Documentation/device-drivers/serial-interfaces.rst
  F:    drivers/hsi/
  F:    include/linux/hsi/
  F:    include/uapi/linux/hsi/
@@@ -6214,7 -6086,7 +6214,7 @@@ S:      Supporte
  F:    drivers/cpufreq/intel_pstate.c
  
  INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
 -M:    Maik Broemme <mbroemme@plusserver.de>
 +M:    Maik Broemme <mbroemme@libmpq.org>
  L:    linux-fbdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/fb/intelfb.txt
@@@ -6716,7 -6588,7 +6716,7 @@@ L:      kasan-dev@googlegroups.co
  S:    Maintained
  F:    arch/*/include/asm/kasan.h
  F:    arch/*/mm/kasan_init*
 -F:    Documentation/kasan.txt
 +F:    Documentation/dev-tools/kasan.rst
  F:    include/linux/kasan*.h
  F:    lib/test_kasan.c
  F:    mm/kasan/
@@@ -6932,7 -6804,7 +6932,7 @@@ KMEMCHEC
  M:    Vegard Nossum <vegardno@ifi.uio.no>
  M:    Pekka Enberg <penberg@kernel.org>
  S:    Maintained
 -F:    Documentation/kmemcheck.txt
 +F:    Documentation/dev-tools/kmemcheck.rst
  F:    arch/x86/include/asm/kmemcheck.h
  F:    arch/x86/mm/kmemcheck/
  F:    include/linux/kmemcheck.h
@@@ -6941,7 -6813,7 +6941,7 @@@ F:      mm/kmemcheck.
  KMEMLEAK
  M:    Catalin Marinas <catalin.marinas@arm.com>
  S:    Maintained
 -F:    Documentation/kmemleak.txt
 +F:    Documentation/dev-tools/kmemleak.rst
  F:    include/linux/kmemleak.h
  F:    mm/kmemleak.c
  F:    mm/kmemleak-test.c
@@@ -7554,8 -7426,9 +7554,8 @@@ F:      Documentation/hwmon/max2075
  F:    drivers/hwmon/max20751.c
  
  MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
 -M:    "Hans J. Koch" <hjk@hansjkoch.de>
  L:    linux-hwmon@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    Documentation/hwmon/max6650
  F:    drivers/hwmon/max6650.c
  
@@@ -7576,8 -7449,7 +7576,8 @@@ F:      Documentation/devicetree/bindings/so
  F:    sound/soc/codecs/max9860.*
  
  MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
 -M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
 +M:    Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    drivers/power/max14577_charger.c
@@@ -7593,8 -7465,7 +7593,8 @@@ F:      include/dt-bindings/*/*max77802.
  
  MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS
  M:    Chanwoo Choi <cw00.choi@samsung.com>
 -M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
 +M:    Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  F:    drivers/*/max14577*.c
@@@ -7626,12 -7497,6 +7626,12 @@@ L:    linux-iio@vger.kernel.or
  S:    Maintained
  F:    drivers/iio/potentiometer/mcp4531.c
  
 +MEASUREMENT COMPUTING CIO-DAC IIO DRIVER
 +M:    William Breathitt Gray <vilhelm.gray@gmail.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/iio/dac/cio-dac.c
 +
  MEDIA DRIVERS FOR RENESAS - FCP
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-media@vger.kernel.org
@@@ -7784,26 -7649,13 +7784,26 @@@ W:   http://www.mellanox.co
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/mellanox/mlxsw/
  
 +MELLANOX MLXCPLD LED DRIVER
 +M:    Vadim Pasternak <vadimp@mellanox.com>
 +L:    linux-leds@vger.kernel.org
 +S:    Supported
 +F:    drivers/leds/leds-mlxcpld.c
 +F:    Documentation/leds/leds-mlxcpld.txt
 +
 +MELLANOX PLATFORM DRIVER
 +M:      Vadim Pasternak <vadimp@mellanox.com>
 +L:      platform-driver-x86@vger.kernel.org
 +S:      Supported
 +F:      arch/x86/platform/mellanox/mlx-platform.c
 +
  SOFT-ROCE DRIVER (rxe)
  M:    Moni Shoua <monis@mellanox.com>
  L:    linux-rdma@vger.kernel.org
  S:    Supported
  W:    https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home
  Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 -F:    drivers/infiniband/hw/rxe/
 +F:    drivers/infiniband/sw/rxe/
  F:    include/uapi/rdma/rdma_user_rxe.h
  
  MEMBARRIER SUPPORT
@@@ -7882,12 -7734,6 +7882,12 @@@ T:    git git://git.monstr.eu/linux-2.6-mi
  S:    Supported
  F:    arch/microblaze/
  
 +MICROCHIP / ATMEL AT91 / AT32 SERIAL DRIVER
 +M:    Richard Genoud <richard.genoud@gmail.com>
 +S:    Maintained
 +F:    drivers/tty/serial/atmel_serial.c
 +F:    include/linux/atmel_serial.h
 +
  MICROSOFT SURFACE PRO 3 BUTTON DRIVER
  M:    Chen Yu <yu.c.chen@intel.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -8296,15 -8142,6 +8296,15 @@@ S:    Maintaine
  W:    https://fedorahosted.org/dropwatch/
  F:    net/core/drop_monitor.c
  
 +NETWORKING [DSA]
 +M:    Andrew Lunn <andrew@lunn.ch>
 +M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
 +S:    Maintained
 +F:    net/dsa/
 +F:    include/net/dsa.h
 +F:    drivers/net/dsa/
 +
  NETWORKING [GENERAL]
  M:    "David S. Miller" <davem@davemloft.net>
  L:    netdev@vger.kernel.org
@@@ -8880,7 -8717,7 +8880,7 @@@ F:      drivers/oprofile
  F:    include/linux/oprofile.h
  
  ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
 -M:    Mark Fasheh <mfasheh@suse.com>
 +M:    Mark Fasheh <mfasheh@versity.com>
  M:    Joel Becker <jlbec@evilplan.org>
  L:    ocfs2-devel@oss.oracle.com (moderated for non-subscribers)
  W:    http://ocfs2.wiki.kernel.org
@@@ -8992,7 -8829,6 +8992,7 @@@ S:      Supporte
  F:    Documentation/virtual/paravirt_ops.txt
  F:    arch/*/kernel/paravirt*
  F:    arch/*/include/asm/paravirt.h
 +F:    include/linux/hypervisor.h
  
  PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES
  M:    Tim Waugh <tim@cyberelk.net>
@@@ -9395,7 -9231,7 +9395,7 @@@ F:      drivers/pinctrl/sh-pfc
  
  PIN CONTROLLER - SAMSUNG
  M:    Tomasz Figa <tomasz.figa@gmail.com>
 -M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
  M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
@@@ -9836,12 -9672,6 +9836,12 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    drivers/net/wireless/ath/ath10k/
  
 +QUALCOMM EMAC GIGABIT ETHERNET DRIVER
 +M:    Timur Tabi <timur@codeaurora.org>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/qualcomm/emac/
 +
  QUALCOMM HEXAGON ARCHITECTURE
  M:    Richard Kuo <rkuo@codeaurora.org>
  L:    linux-hexagon@vger.kernel.org
@@@ -10062,12 -9892,6 +10062,12 @@@ F:  drivers/rpmsg
  F:    Documentation/rpmsg.txt
  F:    include/linux/rpmsg.h
  
 +RENESAS CLOCK DRIVERS
 +M:    Geert Uytterhoeven <geert+renesas@glider.be>
 +L:    linux-renesas-soc@vger.kernel.org
 +S:    Supported
 +F:    drivers/clk/renesas/
 +
  RENESAS ETHERNET DRIVERS
  R:    Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
  L:    netdev@vger.kernel.org
@@@ -10103,7 -9927,6 +10103,7 @@@ F:    net/rfkill
  
  RHASHTABLE
  M:    Thomas Graf <tgraf@suug.ch>
 +M:    Herbert Xu <herbert@gondor.apana.org.au>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    lib/rhashtable.c
@@@ -10247,8 -10070,8 +10247,8 @@@ S:   Supporte
  F:    drivers/s390/cio/
  
  S390 DASD DRIVER
 -M:    Stefan Weinhuber <wein@de.ibm.com>
 -M:    Stefan Haberland <stefan.haberland@de.ibm.com>
 +M:    Stefan Haberland <sth@linux.vnet.ibm.com>
 +M:    Jan Hoeppner <hoeppner@linux.vnet.ibm.com>
  L:    linux-s390@vger.kernel.org
  W:    http://www.ibm.com/developerworks/linux/linux390/
  S:    Supported
@@@ -10341,7 -10164,7 +10341,7 @@@ S:   Maintaine
  F:    drivers/platform/x86/samsung-laptop.c
  
  SAMSUNG AUDIO (ASoC) DRIVERS
 -M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
  M:    Sangbeom Kim <sbkim73@samsung.com>
  M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -10356,8 -10179,7 +10356,8 @@@ F:   drivers/video/fbdev/s3c-fb.
  
  SAMSUNG MULTIFUNCTION PMIC DEVICE DRIVERS
  M:    Sangbeom Kim <sbkim73@samsung.com>
 -M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
 +M:    Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  L:    linux-kernel@vger.kernel.org
  L:    linux-samsung-soc@vger.kernel.org
  S:    Supported
@@@ -10412,23 -10234,9 +10412,23 @@@ F: drivers/nfc/s3fwrn
  SAMSUNG SOC CLOCK DRIVERS
  M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
  M:    Tomasz Figa <tomasz.figa@gmail.com>
 +M:    Chanwoo Choi <cw00.choi@samsung.com>
  S:    Supported
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  F:    drivers/clk/samsung/
 +F:    include/dt-bindings/clock/exynos*.h
 +F:    Documentation/devicetree/bindings/clock/exynos*.txt
 +
 +SAMSUNG SPI DRIVERS
 +M:    Kukjin Kim <kgene@kernel.org>
 +M:    Krzysztof Kozlowski <krzk@kernel.org>
 +M:    Andi Shyti <andi.shyti@samsung.com>
 +L:    linux-spi@vger.kernel.org
 +L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/spi/spi-samsung.txt
 +F:    drivers/spi/spi-s3c*
 +F:    include/linux/platform_data/spi-s3c64xx.h
  
  SAMSUNG SXGBE DRIVERS
  M:    Byungho An <bh74.an@samsung.com>
@@@ -11276,7 -11084,6 +11276,7 @@@ F:   Documentation/spi
  F:    drivers/spi/
  F:    include/linux/spi/
  F:    include/uapi/linux/spi/
 +F:    tools/spi/
  
  SPIDERNET NETWORK DRIVER for CELL
  M:    Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
@@@ -11347,7 -11154,6 +11347,7 @@@ F:   drivers/staging/media/lirc
  STAGING - LUSTRE PARALLEL FILESYSTEM
  M:    Oleg Drokin <oleg.drokin@intel.com>
  M:    Andreas Dilger <andreas.dilger@intel.com>
 +M:    James Simmons <jsimmons@infradead.org>
  L:    lustre-devel@lists.lustre.org (moderated for non-subscribers)
  W:    http://wiki.lustre.org/
  S:    Maintained
@@@ -11374,6 -11180,13 +11374,6 @@@ M:  Florian Schilhabel <florian.c.schilh
  S:    Odd Fixes
  F:    drivers/staging/rtl8712/
  
 -STAGING - REALTEK RTL8723U WIRELESS DRIVER
 -M:    Larry Finger <Larry.Finger@lwfinger.net>
 -M:    Jes Sorensen <Jes.Sorensen@redhat.com>
 -L:    linux-wireless@vger.kernel.org
 -S:    Maintained
 -F:    drivers/staging/rtl8723au/
 -
  STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER
  M:    Sudip Mukherjee <sudipm.mukherjee@gmail.com>
  M:    Teddy Wang <teddy.wang@siliconmotion.com>
@@@ -11404,8 -11217,12 +11404,8 @@@ S:  Odd Fixe
  F:    drivers/staging/vt665?/
  
  STAGING - WILC1000 WIFI DRIVER
 -M:    Johnny Kim <johnny.kim@atmel.com>
 -M:    Austin Shin <austin.shin@atmel.com>
 -M:    Chris Park <chris.park@atmel.com>
 -M:    Tony Cho <tony.cho@atmel.com>
 -M:    Glen Lee <glen.lee@atmel.com>
 -M:    Leo Kim <leo.kim@atmel.com>
 +M:    Aditya Shankar <aditya.shankar@microchip.com>
 +M:    Ganesh Krishna <ganesh.krishna@microchip.com>
  L:    linux-wireless@vger.kernel.org
  S:    Supported
  F:    drivers/staging/wilc1000/
@@@ -11773,7 -11590,7 +11773,7 @@@ F:   Documentation/devicetree/bindings/th
  THERMAL/CPU_COOLING
  M:    Amit Daniel Kachhap <amit.kachhap@gmail.com>
  M:    Viresh Kumar <viresh.kumar@linaro.org>
 -M:    Javi Merino <javi.merino@arm.com>
 +M:    Javi Merino <javi.merino@kernel.org>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    Documentation/thermal/cpu-cooling-api.txt
@@@ -12340,7 -12157,7 +12340,7 @@@ S:   Maintaine
  F:    drivers/net/usb/lan78xx.*
  
  USB MASS STORAGE DRIVER
 -M:    Matthew Dharm <mdharm-usb@one-eyed-alien.net>
 +M:    Alan Stern <stern@rowland.harvard.edu>
  L:    linux-usb@vger.kernel.org
  L:    usb-storage@lists.one-eyed-alien.net
  S:    Maintained
@@@ -12424,7 -12241,6 +12424,7 @@@ F:   drivers/net/usb/rtl8150.
  USB SERIAL SUBSYSTEM
  M:    Johan Hovold <johan@kernel.org>
  L:    linux-usb@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git
  S:    Maintained
  F:    Documentation/usb/usb-serial.txt
  F:    drivers/usb/serial/
@@@ -12438,7 -12254,6 +12438,7 @@@ F:   drivers/net/usb/smsc75xx.
  
  USB SMSC95XX ETHERNET DRIVER
  M:    Steve Glendinning <steve.glendinning@shawell.net>
 +M:    Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/usb/smsc95xx.*
@@@ -12545,6 -12360,7 +12545,6 @@@ F:   fs/hostfs
  F:    fs/hppfs/
  
  USERSPACE I/O (UIO)
 -M:    "Hans J. Koch" <hjk@hansjkoch.de>
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
@@@ -12726,7 -12542,7 +12726,7 @@@ F:   include/linux/if_*vlan.
  F:    net/8021q/
  
  VLYNQ BUS
 -M:    Florian Fainelli <florian@openwrt.org>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    openwrt-devel@lists.openwrt.org (subscribers-only)
  S:    Maintained
  F:    drivers/vlynq/vlynq.c
@@@ -13099,11 -12915,10 +13099,10 @@@ F:        arch/x86/xen/*swiotlb
  F:    drivers/xen/*swiotlb*
  
  XFS FILESYSTEM
- P:    Silicon Graphics Inc
  M:    Dave Chinner <david@fromorbit.com>
- M:    xfs@oss.sgi.com
- L:    xfs@oss.sgi.com
- W:    http://oss.sgi.com/projects/xfs
+ M:    linux-xfs@vger.kernel.org
+ L:    linux-xfs@vger.kernel.org
+ W:    http://xfs.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git
  S:    Supported
  F:    Documentation/filesystems/xfs.txt
diff --combined fs/ext2/inode.c
@@@ -32,6 -32,7 +32,7 @@@
  #include <linux/buffer_head.h>
  #include <linux/mpage.h>
  #include <linux/fiemap.h>
+ #include <linux/iomap.h>
  #include <linux/namei.h>
  #include <linux/uio.h>
  #include "ext2.h"
@@@ -618,7 -619,7 +619,7 @@@ static void ext2_splice_branch(struct i
   */
  static int ext2_get_blocks(struct inode *inode,
                           sector_t iblock, unsigned long maxblocks,
-                          struct buffer_head *bh_result,
+                          u32 *bno, bool *new, bool *boundary,
                           int create)
  {
        int err = -EIO;
        /* Simplest case - block found, no allocation needed */
        if (!partial) {
                first_block = le32_to_cpu(chain[depth - 1].key);
-               clear_buffer_new(bh_result); /* What's this do? */
                count++;
                /*map more blocks*/
                while (count < maxblocks && count <= blocks_to_boundary) {
                        mutex_unlock(&ei->truncate_mutex);
                        if (err)
                                goto cleanup;
-                       clear_buffer_new(bh_result);
                        goto got_it;
                }
        }
        }
  
        if (IS_DAX(inode)) {
 +              int i;
 +
 +              /*
 +               * We must unmap blocks before zeroing so that writeback cannot
 +               * overwrite zeros with stale data from block device page cache.
 +               */
 +              for (i = 0; i < count; i++) {
 +                      unmap_underlying_metadata(inode->i_sb->s_bdev,
 +                                      le32_to_cpu(chain[depth-1].key) + i);
 +              }
                /*
                 * block must be initialised before we put it in the tree
                 * so that it's not found by another thread before it's
                        mutex_unlock(&ei->truncate_mutex);
                        goto cleanup;
                }
-       } else
-               set_buffer_new(bh_result);
+       } else {
+               *new = true;
+       }
  
        ext2_splice_branch(inode, iblock, partial, indirect_blks, count);
        mutex_unlock(&ei->truncate_mutex);
  got_it:
-       map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key));
+       *bno = le32_to_cpu(chain[depth-1].key);
        if (count > blocks_to_boundary)
-               set_buffer_boundary(bh_result);
+               *boundary = true;
        err = count;
        /* Clean up and exit */
        partial = chain + depth - 1;    /* the whole chain */
@@@ -775,19 -765,82 +775,82 @@@ cleanup
        return err;
  }
  
- int ext2_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create)
+ int ext2_get_block(struct inode *inode, sector_t iblock,
+               struct buffer_head *bh_result, int create)
  {
        unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;
-       int ret = ext2_get_blocks(inode, iblock, max_blocks,
-                             bh_result, create);
-       if (ret > 0) {
-               bh_result->b_size = (ret << inode->i_blkbits);
-               ret = 0;
+       bool new = false, boundary = false;
+       u32 bno;
+       int ret;
+       ret = ext2_get_blocks(inode, iblock, max_blocks, &bno, &new, &boundary,
+                       create);
+       if (ret <= 0)
+               return ret;
+       map_bh(bh_result, inode->i_sb, bno);
+       bh_result->b_size = (ret << inode->i_blkbits);
+       if (new)
+               set_buffer_new(bh_result);
+       if (boundary)
+               set_buffer_boundary(bh_result);
+       return 0;
+ }
+ #ifdef CONFIG_FS_DAX
+ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
+               unsigned flags, struct iomap *iomap)
+ {
+       unsigned int blkbits = inode->i_blkbits;
+       unsigned long first_block = offset >> blkbits;
+       unsigned long max_blocks = (length + (1 << blkbits) - 1) >> blkbits;
+       bool new = false, boundary = false;
+       u32 bno;
+       int ret;
+       ret = ext2_get_blocks(inode, first_block, max_blocks,
+                       &bno, &new, &boundary, flags & IOMAP_WRITE);
+       if (ret < 0)
+               return ret;
+       iomap->flags = 0;
+       iomap->bdev = inode->i_sb->s_bdev;
+       iomap->offset = (u64)first_block << blkbits;
+       if (ret == 0) {
+               iomap->type = IOMAP_HOLE;
+               iomap->blkno = IOMAP_NULL_BLOCK;
+               iomap->length = 1 << blkbits;
+       } else {
+               iomap->type = IOMAP_MAPPED;
+               iomap->blkno = (sector_t)bno << (blkbits - 9);
+               iomap->length = (u64)ret << blkbits;
+               iomap->flags |= IOMAP_F_MERGED;
        }
-       return ret;
  
+       if (new)
+               iomap->flags |= IOMAP_F_NEW;
+       return 0;
  }
  
+ static int
+ ext2_iomap_end(struct inode *inode, loff_t offset, loff_t length,
+               ssize_t written, unsigned flags, struct iomap *iomap)
+ {
+       if (iomap->type == IOMAP_MAPPED &&
+           written < length &&
+           (flags & IOMAP_WRITE))
+               ext2_write_failed(inode->i_mapping, offset + length);
+       return 0;
+ }
+ struct iomap_ops ext2_iomap_ops = {
+       .iomap_begin            = ext2_iomap_begin,
+       .iomap_end              = ext2_iomap_end,
+ };
+ #endif /* CONFIG_FS_DAX */
  int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
                u64 start, u64 len)
  {
@@@ -873,11 -926,10 +936,10 @@@ ext2_direct_IO(struct kiocb *iocb, stru
        loff_t offset = iocb->ki_pos;
        ssize_t ret;
  
-       if (IS_DAX(inode))
-               ret = dax_do_io(iocb, inode, iter, ext2_get_block, NULL,
-                               DIO_LOCKING);
-       else
-               ret = blockdev_direct_IO(iocb, inode, iter, ext2_get_block);
+       if (WARN_ON_ONCE(IS_DAX(inode)))
+               return -EIO;
+       ret = blockdev_direct_IO(iocb, inode, iter, ext2_get_block);
        if (ret < 0 && iov_iter_rw(iter) == WRITE)
                ext2_write_failed(mapping, offset + count);
        return ret;
diff --combined mm/filemap.c
   *   ->tasklist_lock            (memory_failure, collect_procs_ao)
   */
  
 +static int page_cache_tree_insert(struct address_space *mapping,
 +                                struct page *page, void **shadowp)
 +{
 +      struct radix_tree_node *node;
 +      void **slot;
 +      int error;
 +
 +      error = __radix_tree_create(&mapping->page_tree, page->index, 0,
 +                                  &node, &slot);
 +      if (error)
 +              return error;
 +      if (*slot) {
 +              void *p;
 +
 +              p = radix_tree_deref_slot_protected(slot, &mapping->tree_lock);
 +              if (!radix_tree_exceptional_entry(p))
 +                      return -EEXIST;
 +
 +              mapping->nrexceptional--;
 +              if (!dax_mapping(mapping)) {
 +                      if (shadowp)
 +                              *shadowp = p;
 +                      if (node)
 +                              workingset_node_shadows_dec(node);
 +              } else {
 +                      /* DAX can replace empty locked entry with a hole */
 +                      WARN_ON_ONCE(p !=
 +                              (void *)(RADIX_TREE_EXCEPTIONAL_ENTRY |
 +                                       RADIX_DAX_ENTRY_LOCK));
 +                      /* DAX accounts exceptional entries as normal pages */
 +                      if (node)
 +                              workingset_node_pages_dec(node);
 +                      /* Wakeup waiters for exceptional entry lock */
 +                      dax_wake_mapping_entry_waiter(mapping, page->index,
 +                                                    false);
 +              }
 +      }
 +      radix_tree_replace_slot(slot, page);
 +      mapping->nrpages++;
 +      if (node) {
 +              workingset_node_pages_inc(node);
 +              /*
 +               * Don't track node that contains actual pages.
 +               *
 +               * Avoid acquiring the list_lru lock if already
 +               * untracked.  The list_empty() test is safe as
 +               * node->private_list is protected by
 +               * mapping->tree_lock.
 +               */
 +              if (!list_empty(&node->private_list))
 +                      list_lru_del(&workingset_shadow_nodes,
 +                                   &node->private_list);
 +      }
 +      return 0;
 +}
 +
  static void page_cache_tree_delete(struct address_space *mapping,
                                   struct page *page, void *shadow)
  {
 -      struct radix_tree_node *node;
        int i, nr = PageHuge(page) ? 1 : hpage_nr_pages(page);
  
        VM_BUG_ON_PAGE(!PageLocked(page), page);
        VM_BUG_ON_PAGE(PageTail(page), page);
        VM_BUG_ON_PAGE(nr != 1 && shadow, page);
  
 -      if (shadow) {
 -              mapping->nrexceptional += nr;
 -              /*
 -               * Make sure the nrexceptional update is committed before
 -               * the nrpages update so that final truncate racing
 -               * with reclaim does not see both counters 0 at the
 -               * same time and miss a shadow entry.
 -               */
 -              smp_wmb();
 -      }
 -      mapping->nrpages -= nr;
 -
        for (i = 0; i < nr; i++) {
 -              node = radix_tree_replace_clear_tags(&mapping->page_tree,
 -                              page->index + i, shadow);
 +              struct radix_tree_node *node;
 +              void **slot;
 +
 +              __radix_tree_lookup(&mapping->page_tree, page->index + i,
 +                                  &node, &slot);
 +
 +              radix_tree_clear_tags(&mapping->page_tree, node, slot);
 +
                if (!node) {
                        VM_BUG_ON_PAGE(nr != 1, page);
 -                      return;
 +                      /*
 +                       * We need a node to properly account shadow
 +                       * entries. Don't plant any without. XXX
 +                       */
 +                      shadow = NULL;
                }
  
 +              radix_tree_replace_slot(slot, shadow);
 +
 +              if (!node)
 +                      break;
 +
                workingset_node_pages_dec(node);
                if (shadow)
                        workingset_node_shadows_inc(node);
                                        &node->private_list);
                }
        }
 +
 +      if (shadow) {
 +              mapping->nrexceptional += nr;
 +              /*
 +               * Make sure the nrexceptional update is committed before
 +               * the nrpages update so that final truncate racing
 +               * with reclaim does not see both counters 0 at the
 +               * same time and miss a shadow entry.
 +               */
 +              smp_wmb();
 +      }
 +      mapping->nrpages -= nr;
  }
  
  /*
@@@ -631,8 -561,9 +631,8 @@@ int replace_page_cache_page(struct pag
  
                spin_lock_irqsave(&mapping->tree_lock, flags);
                __delete_from_page_cache(old, NULL);
 -              error = radix_tree_insert(&mapping->page_tree, offset, new);
 +              error = page_cache_tree_insert(mapping, new, NULL);
                BUG_ON(error);
 -              mapping->nrpages++;
  
                /*
                 * hugetlb pages do not participate in page cache accounting.
  }
  EXPORT_SYMBOL_GPL(replace_page_cache_page);
  
 -static int page_cache_tree_insert(struct address_space *mapping,
 -                                struct page *page, void **shadowp)
 -{
 -      struct radix_tree_node *node;
 -      void **slot;
 -      int error;
 -
 -      error = __radix_tree_create(&mapping->page_tree, page->index, 0,
 -                                  &node, &slot);
 -      if (error)
 -              return error;
 -      if (*slot) {
 -              void *p;
 -
 -              p = radix_tree_deref_slot_protected(slot, &mapping->tree_lock);
 -              if (!radix_tree_exceptional_entry(p))
 -                      return -EEXIST;
 -
 -              mapping->nrexceptional--;
 -              if (!dax_mapping(mapping)) {
 -                      if (shadowp)
 -                              *shadowp = p;
 -                      if (node)
 -                              workingset_node_shadows_dec(node);
 -              } else {
 -                      /* DAX can replace empty locked entry with a hole */
 -                      WARN_ON_ONCE(p !=
 -                              (void *)(RADIX_TREE_EXCEPTIONAL_ENTRY |
 -                                       RADIX_DAX_ENTRY_LOCK));
 -                      /* DAX accounts exceptional entries as normal pages */
 -                      if (node)
 -                              workingset_node_pages_dec(node);
 -                      /* Wakeup waiters for exceptional entry lock */
 -                      dax_wake_mapping_entry_waiter(mapping, page->index,
 -                                                    false);
 -              }
 -      }
 -      radix_tree_replace_slot(slot, page);
 -      mapping->nrpages++;
 -      if (node) {
 -              workingset_node_pages_inc(node);
 -              /*
 -               * Don't track node that contains actual pages.
 -               *
 -               * Avoid acquiring the list_lru lock if already
 -               * untracked.  The list_empty() test is safe as
 -               * node->private_list is protected by
 -               * mapping->tree_lock.
 -               */
 -              if (!list_empty(&node->private_list))
 -                      list_lru_del(&workingset_shadow_nodes,
 -                                   &node->private_list);
 -      }
 -      return 0;
 -}
 -
  static int __add_to_page_cache_locked(struct page *page,
                                      struct address_space *mapping,
                                      pgoff_t offset, gfp_t gfp_mask,
@@@ -1923,16 -1910,18 +1923,18 @@@ generic_file_read_iter(struct kiocb *io
        if (iocb->ki_flags & IOCB_DIRECT) {
                struct address_space *mapping = file->f_mapping;
                struct inode *inode = mapping->host;
+               struct iov_iter data = *iter;
                loff_t size;
  
                size = i_size_read(inode);
                retval = filemap_write_and_wait_range(mapping, iocb->ki_pos,
                                        iocb->ki_pos + count - 1);
-               if (!retval) {
-                       struct iov_iter data = *iter;
-                       retval = mapping->a_ops->direct_IO(iocb, &data);
-               }
+               if (retval < 0)
+                       goto out;
  
+               file_accessed(file);
+               retval = mapping->a_ops->direct_IO(iocb, &data);
                if (retval > 0) {
                        iocb->ki_pos += retval;
                        iov_iter_advance(iter, retval);
                 * DAX files, so don't bother trying.
                 */
                if (retval < 0 || !iov_iter_count(iter) || iocb->ki_pos >= size ||
-                   IS_DAX(inode)) {
-                       file_accessed(file);
+                   IS_DAX(inode))
                        goto out;
-               }
        }
  
        retval = do_generic_file_read(file, &iocb->ki_pos, iter, retval);