Merge branch 'locks-3.15' of git://git.samba.org/jlayton/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Apr 2014 21:21:20 +0000 (14:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Apr 2014 21:21:20 +0000 (14:21 -0700)
Pull file locking updates from Jeff Layton:
 "Highlights:

   - maintainership change for fs/locks.c.  Willy's not interested in
     maintaining it these days, and is OK with Bruce and I taking it.
   - fix for open vs setlease race that Al ID'ed
   - cleanup and consolidation of file locking code
   - eliminate unneeded BUG() call
   - merge of file-private lock implementation"

* 'locks-3.15' of git://git.samba.org/jlayton/linux:
  locks: make locks_mandatory_area check for file-private locks
  locks: fix locks_mandatory_locked to respect file-private locks
  locks: require that flock->l_pid be set to 0 for file-private locks
  locks: add new fcntl cmd values for handling file private locks
  locks: skip deadlock detection on FL_FILE_PVT locks
  locks: pass the cmd value to fcntl_getlk/getlk64
  locks: report l_pid as -1 for FL_FILE_PVT locks
  locks: make /proc/locks show IS_FILE_PVT locks as type "FLPVT"
  locks: rename locks_remove_flock to locks_remove_file
  locks: consolidate checks for compatible filp->f_mode values in setlk handlers
  locks: fix posix lock range overflow handling
  locks: eliminate BUG() call when there's an unexpected lock on file close
  locks: add __acquires and __releases annotations to locks_start and locks_stop
  locks: remove "inline" qualifier from fl_link manipulation functions
  locks: clean up comment typo
  locks: close potential race between setlease and open
  MAINTAINERS: update entry for fs/locks.c

1  2 
MAINTAINERS
fs/compat.c
fs/file_table.c
fs/namei.c
include/linux/fs.h
mm/mmap.c
security/selinux/hooks.c

diff --combined MAINTAINERS
@@@ -73,8 -73,7 +73,8 @@@ Descriptions of section entries
        L: Mailing list that is relevant to this area
        W: Web-page with status/info
        Q: Patchwork web based patch tracking system site
 -      T: SCM tree type and location.  Type is one of: git, hg, quilt, stgit, topgit.
 +      T: SCM tree type and location.
 +         Type is one of: git, hg, quilt, stgit, topgit
        S: Status, one of the following:
           Supported:   Someone is actually paid to look after this.
           Maintained:  Someone actually looks after it.
@@@ -242,8 -241,8 +242,8 @@@ S: Maintaine
  F:    drivers/platform/x86/acer-wmi.c
  
  ACPI
 -M:    Len Brown <lenb@kernel.org>
  M:    Rafael J. Wysocki <rjw@rjwysocki.net>
 +M:    Len Brown <lenb@kernel.org>
  L:    linux-acpi@vger.kernel.org
  W:    https://01.org/linux-acpi
  Q:    https://patchwork.kernel.org/project/linux-acpi/list/
@@@ -474,7 -473,7 +474,7 @@@ F: net/rxrpc/af_rxrpc.
  
  AGPGART DRIVER
  M:    David Airlie <airlied@linux.ie>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
 +T:    git git://people.freedesktop.org/~airlied/linux (part of drm maint)
  S:    Maintained
  F:    drivers/char/agp/
  F:    include/linux/agp*
@@@ -536,17 -535,10 +536,17 @@@ S:      Odd Fixe
  L:    linux-alpha@vger.kernel.org
  F:    arch/alpha/
  
 +ALTERA TRIPLE SPEED ETHERNET DRIVER
 +M:    Vince Bridgers <vbridgers2013@gmail.com
 +L:    netdev@vger.kernel.org
 +L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/net/ethernet/altera/
 +
  ALTERA UART/JTAG UART SERIAL DRIVERS
  M:    Tobias Klauser <tklauser@distanz.ch>
  L:    linux-serial@vger.kernel.org
 -L:    nios2-dev@sopc.et.ntust.edu.tw (moderated for non-subscribers)
 +L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/tty/serial/altera_uart.c
  F:    drivers/tty/serial/altera_jtaguart.c
@@@ -918,11 -910,11 +918,11 @@@ F:      arch/arm/include/asm/hardware/dec212
  F:    arch/arm/mach-footbridge/
  
  ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
 -M:    Shawn Guo <shawn.guo@linaro.org>
 +M:    Shawn Guo <shawn.guo@freescale.com>
  M:    Sascha Hauer <kernel@pengutronix.de>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -T:    git git://git.linaro.org/people/shawnguo/linux-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
  F:    arch/arm/mach-imx/
  F:    arch/arm/boot/dts/imx*
  F:    arch/arm/configs/imx*_defconfig
@@@ -1327,7 -1319,6 +1327,7 @@@ M:      Linus Walleij <linus.walleij@linaro.
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
  F:    arch/arm/mach-u300/
 +F:    drivers/clocksource/timer-u300.c
  F:    drivers/i2c/busses/i2c-stu300.c
  F:    drivers/rtc/rtc-coh901331.c
  F:    drivers/watchdog/coh901327_wdt.c
@@@ -1621,11 -1612,11 +1621,11 @@@ S:   Maintaine
  F:    drivers/net/wireless/atmel*
  
  ATTO EXPRESSSAS SAS/SATA RAID SCSI DRIVER
 -M:      Bradley Grove <linuxdrivers@attotech.com>
 -L:      linux-scsi@vger.kernel.org
 -W:      http://www.attotech.com
 -S:      Supported
 -F:      drivers/scsi/esas2r
 +M:    Bradley Grove <linuxdrivers@attotech.com>
 +L:    linux-scsi@vger.kernel.org
 +W:    http://www.attotech.com
 +S:    Supported
 +F:    drivers/scsi/esas2r
  
  AUDIT SUBSYSTEM
  M:    Eric Paris <eparis@redhat.com>
@@@ -1704,8 -1695,6 +1704,8 @@@ F:      drivers/net/wireless/b43legacy
  
  BACKLIGHT CLASS/SUBSYSTEM
  M:    Jingoo Han <jg1.han@samsung.com>
 +M:    Bryan Wu <cooloney@gmail.com>
 +M:    Lee Jones <lee.jones@linaro.org>
  S:    Maintained
  F:    drivers/video/backlight/
  F:    include/linux/backlight.h
@@@ -1748,7 -1737,6 +1748,7 @@@ F:      include/uapi/linux/bfs_fs.
  BLACKFIN ARCHITECTURE
  M:    Steven Miao <realmz6@gmail.com>
  L:    adi-buildroot-devel@lists.sourceforge.net
 +T:    git git://git.code.sf.net/p/adi-linux/code
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    arch/blackfin/
@@@ -1842,8 -1830,8 +1842,8 @@@ F:      net/bluetooth
  F:    include/net/bluetooth/
  
  BONDING DRIVER
 -M:    Jay Vosburgh <fubar@us.ibm.com>
 -M:    Veaceslav Falico <vfalico@redhat.com>
 +M:    Jay Vosburgh <j.vosburgh@gmail.com>
 +M:    Veaceslav Falico <vfalico@gmail.com>
  M:    Andy Gospodarek <andy@greyhouse.net>
  L:    netdev@vger.kernel.org
  W:    http://sourceforge.net/projects/bonding/
@@@ -1857,12 -1845,6 +1857,12 @@@ L:    netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/broadcom/b44.*
  
 +BROADCOM GENET ETHERNET DRIVER
 +M:    Florian Fainelli <f.fainelli@gmail.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/broadcom/genet/
 +
  BROADCOM BNX2 GIGABIT ETHERNET DRIVER
  M:    Michael Chan <mchan@broadcom.com>
  L:    netdev@vger.kernel.org
@@@ -1878,7 -1860,6 +1878,7 @@@ F:      drivers/net/ethernet/broadcom/bnx2x
  
  BROADCOM BCM281XX/BCM11XXX ARM ARCHITECTURE
  M:    Christian Daudt <bcm@fixthebug.org>
 +M:    Matt Porter <mporter@linaro.org>
  L:    bcm-kernel-feedback-list@broadcom.com
  T:    git git://git.github.com/broadcom/bcm11351
  S:    Maintained
@@@ -1928,13 -1909,6 +1928,13 @@@ L:    linux-scsi@vger.kernel.or
  S:    Supported
  F:    drivers/scsi/bnx2i/
  
 +BROADCOM KONA GPIO DRIVER
 +M:    Markus Mayer <markus.mayer@linaro.org>
 +L:    bcm-kernel-feedback-list@broadcom.com
 +S:    Supported
 +F:    drivers/gpio/gpio-bcm-kona.c
 +F:    Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt
 +
  BROADCOM SPECIFIC AMBA DRIVER (BCMA)
  M:    Rafał Miłecki <zajec5@gmail.com>
  L:    linux-wireless@vger.kernel.org
@@@ -1943,8 -1917,8 +1943,8 @@@ F:      drivers/bcma
  F:    include/linux/bcma/
  
  BROCADE BFA FC SCSI DRIVER
 -M:    Anil Gurumurthy <agurumur@brocade.com>
 -M:    Vijaya Mohan Guvva <vmohan@brocade.com>
 +M:    Anil Gurumurthy <anil.gurumurthy@qlogic.com>
 +M:    Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/bfa/
@@@ -2184,7 -2158,7 +2184,7 @@@ F:      Documentation/zh_CN
  
  CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
  M:    Peter Chen <Peter.Chen@freescale.com>
 -T:    git://github.com/hzpeterchen/linux-usb.git
 +T:    git git://github.com/hzpeterchen/linux-usb.git
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    drivers/usb/chipidea/
@@@ -2204,9 -2178,9 +2204,9 @@@ S:      Supporte
  F:    drivers/net/ethernet/cisco/enic/
  
  CISCO VIC LOW LATENCY NIC DRIVER
 -M:      Upinder Malhi <umalhi@cisco.com>
 -S:      Supported
 -F:      drivers/infiniband/hw/usnic
 +M:    Upinder Malhi <umalhi@cisco.com>
 +S:    Supported
 +F:    drivers/infiniband/hw/usnic
  
  CIRRUS LOGIC EP93XX ETHERNET DRIVER
  M:    Hartley Sweeten <hsweeten@visionengravers.com>
@@@ -2226,13 -2200,6 +2226,13 @@@ L:    alsa-devel@alsa-project.org (moderat
  S:    Odd Fixes
  F:    sound/soc/codecs/cs4270*
  
 +CIRRUS LOGIC AUDIO CODEC DRIVERS
 +M:    Brian Austin <brian.austin@cirrus.com>
 +M:    Paul Handrigan <Paul.Handrigan@cirrus.com>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    sound/soc/codecs/cs*
 +
  CLEANCACHE API
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  L:    linux-kernel@vger.kernel.org
@@@ -2400,7 -2367,7 +2400,7 @@@ F:      include/linux/cpufreq.
  
  CPU FREQUENCY DRIVERS - ARM BIG LITTLE
  M:    Viresh Kumar <viresh.kumar@linaro.org>
 -M:    Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
 +M:    Sudeep Holla <sudeep.holla@arm.com>
  L:    cpufreq@vger.kernel.org
  L:    linux-pm@vger.kernel.org
  W:    http://www.arm.com/products/processors/technologies/biglittleprocessing.php
@@@ -2410,20 -2377,20 +2410,20 @@@ F:   drivers/cpufreq/arm_big_little.
  F:    drivers/cpufreq/arm_big_little_dt.c
  
  CPUIDLE DRIVER - ARM BIG LITTLE
 -M:      Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 -M:      Daniel Lezcano <daniel.lezcano@linaro.org>
 -L:      linux-pm@vger.kernel.org
 -L:      linux-arm-kernel@lists.infradead.org
 -T:      git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
 -S:      Maintained
 -F:      drivers/cpuidle/cpuidle-big_little.c
 +M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 +M:    Daniel Lezcano <daniel.lezcano@linaro.org>
 +L:    linux-pm@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
 +S:    Maintained
 +F:    drivers/cpuidle/cpuidle-big_little.c
  
  CPUIDLE DRIVERS
  M:    Rafael J. Wysocki <rjw@rjwysocki.net>
  M:    Daniel Lezcano <daniel.lezcano@linaro.org>
  L:    linux-pm@vger.kernel.org
  S:    Maintained
 -T:    git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
  F:    drivers/cpuidle/*
  F:    include/linux/cpuidle.h
  
@@@ -2441,10 -2408,8 +2441,10 @@@ F:    tools/power/cpupower
  
  CPUSETS
  M:    Li Zefan <lizefan@huawei.com>
 +L:    cgroups@vger.kernel.org
  W:    http://www.bullopensource.org/cpuset/
  W:    http://oss.sgi.com/projects/cpusets/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
  F:    Documentation/cgroups/cpusets.txt
  F:    include/linux/cpuset.h
@@@ -2490,9 -2455,9 +2490,9 @@@ S:      Maintaine
  F:    sound/pci/cs5535audio/
  
  CW1200 WLAN driver
 -M:     Solomon Peachy <pizza@shaftnet.org>
 -S:     Maintained
 -F:     drivers/net/wireless/cw1200/
 +M:    Solomon Peachy <pizza@shaftnet.org>
 +S:    Maintained
 +F:    drivers/net/wireless/cw1200/
  
  CX18 VIDEO4LINUX DRIVER
  M:    Andy Walls <awalls@md.metrocast.net>
@@@ -2643,9 -2608,9 +2643,9 @@@ DC395x SCSI drive
  M:    Oliver Neukum <oliver@neukum.org>
  M:    Ali Akcaagac <aliakc@web.de>
  M:    Jamie Lenehan <lenehan@twibble.org>
 -W:    http://twibble.org/dist/dc395x/
  L:    dc395x@twibble.org
 -L:    http://lists.twibble.org/mailman/listinfo/dc395x/
 +W:    http://twibble.org/dist/dc395x/
 +W:    http://lists.twibble.org/mailman/listinfo/dc395x/
  S:    Maintained
  F:    Documentation/scsi/dc395x.txt
  F:    drivers/scsi/dc395x.*
@@@ -2737,31 -2702,6 +2737,31 @@@ F:    include/linux/device-mapper.
  F:    include/linux/dm-*.h
  F:    include/uapi/linux/dm-*.h
  
 +DIALOG SEMICONDUCTOR DRIVERS
 +M:    Support Opensource <support.opensource@diasemi.com>
 +W:    http://www.dialog-semiconductor.com/products
 +S:    Supported
 +F:    Documentation/hwmon/da90??
 +F:    drivers/gpio/gpio-da90??.c
 +F:    drivers/hwmon/da90??-hwmon.c
 +F:    drivers/input/misc/da90??_onkey.c
 +F:    drivers/input/touchscreen/da9052_tsi.c
 +F:    drivers/leds/leds-da90??.c
 +F:    drivers/mfd/da903x.c
 +F:    drivers/mfd/da90??-*.c
 +F:    drivers/power/da9052-battery.c
 +F:    drivers/regulator/da903x.c
 +F:    drivers/regulator/da9???-regulator.[ch]
 +F:    drivers/rtc/rtc-da90??.c
 +F:    drivers/video/backlight/da90??_bl.c
 +F:    drivers/watchdog/da90??_wdt.c
 +F:    include/linux/mfd/da903x.h
 +F:    include/linux/mfd/da9052/
 +F:    include/linux/mfd/da9055/
 +F:    include/linux/mfd/da9063/
 +F:    include/sound/da[79]*.h
 +F:    sound/soc/codecs/da[79]*.[ch]
 +
  DIGI NEO AND CLASSIC PCI PRODUCTS
  M:    Lidza Louina <lidza.louina@gmail.com>
  L:    driverdev-devel@linuxdriverproject.org
@@@ -2856,9 -2796,9 +2856,9 @@@ S:      Supporte
  F:    drivers/acpi/dock.c
  
  DOCUMENTATION
 -M:    Rob Landley <rob@landley.net>
 +M:    Randy Dunlap <rdunlap@infradead.org>
  L:    linux-doc@vger.kernel.org
 -T:    TBD
 +T:    quilt http://www.infradead.org/~rdunlap/Doc/patches/
  S:    Maintained
  F:    Documentation/
  
@@@ -2905,29 -2845,19 +2905,29 @@@ F:   lib/kobj
  DRM DRIVERS
  M:    David Airlie <airlied@linux.ie>
  L:    dri-devel@lists.freedesktop.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
 +T:    git git://people.freedesktop.org/~airlied/linux
  S:    Maintained
  F:    drivers/gpu/drm/
  F:    include/drm/
  F:    include/uapi/drm/
  
 +RADEON DRM DRIVERS
 +M:    Alex Deucher <alexander.deucher@amd.com>
 +M:    Christian König <christian.koenig@amd.com>
 +L:    dri-devel@lists.freedesktop.org
 +T:    git git://people.freedesktop.org/~agd5f/linux
 +S:    Supported
 +F:    drivers/gpu/drm/radeon/
 +F:    include/drm/radeon*
 +F:    include/uapi/drm/radeon*
 +
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
  M:    Daniel Vetter <daniel.vetter@ffwll.ch>
  M:    Jani Nikula <jani.nikula@linux.intel.com>
  L:    intel-gfx@lists.freedesktop.org
  L:    dri-devel@lists.freedesktop.org
  Q:    http://patchwork.freedesktop.org/project/intel-gfx/
 -T:    git git://people.freedesktop.org/~danvet/drm-intel
 +T:    git git://anongit.freedesktop.org/drm-intel
  S:    Supported
  F:    drivers/gpu/drm/i915/
  F:    include/drm/i915*
@@@ -3152,8 -3082,6 +3152,8 @@@ F:      fs/ecryptfs
  
  EDAC-CORE
  M:    Doug Thompson <dougthompson@xmission.com>
 +M:    Borislav Petkov <bp@alien8.de>
 +M:    Mauro Carvalho Chehab <m.chehab@samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
  S:    Supported
@@@ -3396,17 -3324,6 +3396,17 @@@ S:    Maintaine
  F:    include/linux/netfilter_bridge/
  F:    net/bridge/
  
 +ETHERNET PHY LIBRARY
 +M:    Florian Fainelli <f.fainelli@gmail.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    include/linux/phy.h
 +F:    include/linux/phy_fixed.h
 +F:    drivers/net/phy/
 +F:    Documentation/networking/phy.txt
 +F:    drivers/of/of_mdio.c
 +F:    drivers/of/of_net.c
 +
  EXT2 FILE SYSTEM
  M:    Jan Kara <jack@suse.cz>
  L:    linux-ext4@vger.kernel.org
@@@ -3435,9 -3352,7 +3435,9 @@@ F:      Documentation/filesystems/ext4.tx
  F:    fs/ext4/
  
  Extended Verification Module (EVM)
 -M:    Mimi Zohar <zohar@us.ibm.com>
 +M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
 +L:    linux-ima-devel@lists.sourceforge.net
 +L:    linux-security-module@vger.kernel.org
  S:    Supported
  F:    security/integrity/evm/
  
@@@ -3521,7 -3436,8 +3521,8 @@@ F:      include/scsi/libfcoe.
  F:    include/uapi/scsi/fc/
  
  FILE LOCKING (flock() and fcntl()/lockf())
- M:    Matthew Wilcox <matthew@wil.cx>
+ M:    Jeff Layton <jlayton@redhat.com>
+ M:    J. Bruce Fields <bfields@fieldses.org>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
  F:    include/linux/fcntl.h
@@@ -3714,8 -3630,8 +3715,8 @@@ S:      Maintaine
  F:    fs/freevxfs/
  
  FREEZER
 -M:    Pavel Machek <pavel@ucw.cz>
  M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
 +M:    Pavel Machek <pavel@ucw.cz>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    Documentation/power/freezing-of-tasks.txt
@@@ -4079,8 -3995,8 +4080,8 @@@ S:      Maintaine
  F:    drivers/video/hgafb.c
  
  HIBERNATION (aka Software Suspend, aka swsusp)
 -M:    Pavel Machek <pavel@ucw.cz>
  M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
 +M:    Pavel Machek <pavel@ucw.cz>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    arch/x86/power/
@@@ -4162,7 -4078,8 +4163,7 @@@ F:      include/linux/hpet.
  F:    include/uapi/linux/hpet.h
  
  HPET: x86
 -M:    "Venkatesh Pallipadi (Venki)" <venki@google.com>
 -S:    Maintained
 +S:    Orphan
  F:    arch/x86/kernel/hpet.c
  F:    arch/x86/include/asm/hpet.h
  
@@@ -4458,11 -4375,8 +4459,11 @@@ S:    Maintaine
  F:    drivers/ipack/
  
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
 -M:    Mimi Zohar <zohar@us.ibm.com>
 +M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
  M:    Dmitry Kasatkin <d.kasatkin@samsung.com>
 +L:    linux-ima-devel@lists.sourceforge.net
 +L:    linux-ima-user@lists.sourceforge.net
 +L:    linux-security-module@vger.kernel.org
  S:    Supported
  F:    security/integrity/ima/
  
@@@ -4604,7 -4518,6 +4605,7 @@@ M:      Greg Rose <gregory.v.rose@intel.com
  M:    Alex Duyck <alexander.h.duyck@intel.com>
  M:    John Ronciak <john.ronciak@intel.com>
  M:    Mitch Williams <mitch.a.williams@intel.com>
 +M:    Linux NICS <linux.nics@intel.com>
  L:    e1000-devel@lists.sourceforge.net
  W:    http://www.intel.com/support/feedback.htm
  W:    http://e1000.sourceforge.net/
@@@ -4622,7 -4535,6 +4623,7 @@@ F:      Documentation/networking/ixgbevf.tx
  F:    Documentation/networking/i40e.txt
  F:    Documentation/networking/i40evf.txt
  F:    drivers/net/ethernet/intel/
 +F:    drivers/net/ethernet/intel/*/
  
  INTEL-MID GPIO DRIVER
  M:    David Cohen <david.a.cohen@linux.intel.com>
@@@ -4653,7 -4565,7 +4654,7 @@@ F:      arch/x86/kernel/tboot.
  INTEL WIRELESS WIMAX CONNECTION 2400
  M:    Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
  M:    linux-wimax@intel.com
 -L:    wimax@linuxwimax.org
 +L:     wimax@linuxwimax.org (subscribers-only)
  S:    Supported
  W:    http://linuxwimax.org
  F:    Documentation/wimax/README.i2400m
@@@ -4859,6 -4771,22 +4860,6 @@@ S:     Maintaine
  F:    Documentation/hwmon/it87
  F:    drivers/hwmon/it87.c
  
 -IT913X MEDIA DRIVER
 -M:    Malcolm Priestley <tvboxspy@gmail.com>
 -L:    linux-media@vger.kernel.org
 -W:    http://linuxtv.org/
 -Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 -S:    Maintained
 -F:    drivers/media/usb/dvb-usb-v2/it913x*
 -
 -IT913X FE MEDIA DRIVER
 -M:    Malcolm Priestley <tvboxspy@gmail.com>
 -L:    linux-media@vger.kernel.org
 -W:    http://linuxtv.org/
 -Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 -S:    Maintained
 -F:    drivers/media/dvb-frontends/it913x-fe*
 -
  IT913X MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -4963,7 -4891,7 +4964,7 @@@ F:      drivers/staging/ktap
  KCONFIG
  M:    "Yann E. MORIN" <yann.morin.1998@free.fr>
  L:    linux-kbuild@vger.kernel.org
 -T:    git://gitorious.org/linux-kconfig/linux-kconfig
 +T:    git git://gitorious.org/linux-kconfig/linux-kconfig
  S:    Maintained
  F:    Documentation/kbuild/kconfig-language.txt
  F:    scripts/kconfig/
@@@ -5114,8 -5042,8 +5115,8 @@@ F:      include/keys
  F:    security/keys/
  
  KEYS-TRUSTED
 -M:    David Safford <safford@watson.ibm.com>
 -M:    Mimi Zohar <zohar@us.ibm.com>
 +M:    David Safford <safford@us.ibm.com>
 +M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
  L:    linux-security-module@vger.kernel.org
  L:    keyrings@linux-nfs.org
  S:    Supported
@@@ -5125,8 -5053,8 +5126,8 @@@ F:      security/keys/trusted.
  F:    security/keys/trusted.h
  
  KEYS-ENCRYPTED
 -M:    Mimi Zohar <zohar@us.ibm.com>
 -M:    David Safford <safford@watson.ibm.com>
 +M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
 +M:    David Safford <safford@us.ibm.com>
  L:    linux-security-module@vger.kernel.org
  L:    keyrings@linux-nfs.org
  S:    Supported
@@@ -5289,10 -5217,11 +5290,10 @@@ F:   arch/powerpc/platforms/512x
  F:    arch/powerpc/platforms/52xx/
  
  LINUX FOR POWERPC EMBEDDED PPC4XX
 -M:    Josh Boyer <jwboyer@gmail.com>
 +M:  Alistair Popple <alistair@popple.id.au>
  M:    Matt Porter <mporter@kernel.crashing.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@lists.ozlabs.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
  S:    Maintained
  F:    arch/powerpc/platforms/40x/
  F:    arch/powerpc/platforms/44x/
@@@ -5519,11 -5448,11 +5520,11 @@@ S:   Maintaine
  F:    drivers/media/tuners/m88ts2022*
  
  MA901 MASTERKIT USB FM RADIO DRIVER
 -M:      Alexey Klimov <klimov.linux@gmail.com>
 -L:      linux-media@vger.kernel.org
 -T:      git git://linuxtv.org/media_tree.git
 -S:      Maintained
 -F:      drivers/media/radio/radio-ma901.c
 +M:    Alexey Klimov <klimov.linux@gmail.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/radio/radio-ma901.c
  
  MAC80211
  M:    Johannes Berg <johannes@sipsolutions.net>
@@@ -5559,11 -5488,6 +5560,11 @@@ W:    http://www.kernel.org/doc/man-page
  L:    linux-man@vger.kernel.org
  S:    Maintained
  
 +MARVELL ARMADA DRM SUPPORT
 +M:    Russell King <rmk+kernel@arm.linux.org.uk>
 +S:    Maintained
 +F:    drivers/gpu/drm/armada/
 +
  MARVELL GIGABIT ETHERNET DRIVERS (skge/sky2)
  M:    Mirko Lindner <mlindner@marvell.com>
  M:    Stephen Hemminger <stephen@networkplumber.org>
@@@ -5684,7 -5608,7 +5685,7 @@@ F:      drivers/scsi/megaraid
  
  MELLANOX ETHERNET DRIVER (mlx4_en)
  M:    Amir Vadai <amirv@mellanox.com>
 -L:    netdev@vger.kernel.org
 +L:    netdev@vger.kernel.org
  S:    Supported
  W:    http://www.mellanox.com
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
@@@ -5725,17 -5649,11 +5726,17 @@@ F:   include/linux/mtd
  F:    include/uapi/mtd/
  
  MEN A21 WATCHDOG DRIVER
 -M:    Johannes Thumshirn <johannes.thumshirn@men.de>
 +M:    Johannes Thumshirn <johannes.thumshirn@men.de>
  L:    linux-watchdog@vger.kernel.org
  S:    Supported
  F:    drivers/watchdog/mena21_wdt.c
  
 +MEN CHAMELEON BUS (mcb)
 +M:    Johannes Thumshirn <johannes.thumshirn@men.de>
 +S:    Supported
 +F:    drivers/mcb/
 +F:    include/linux/mcb.h
 +
  METAG ARCHITECTURE
  M:    James Hogan <james.hogan@imgtec.com>
  L:    linux-metag@vger.kernel.org
@@@ -5751,6 -5669,7 +5752,6 @@@ F:      fs/imgdafs
  
  MICROBLAZE ARCHITECTURE
  M:    Michal Simek <monstr@monstr.eu>
 -L:    microblaze-uclinux@itee.uq.edu.au (moderated for non-subscribers)
  W:    http://www.monstr.eu/fdt/
  T:    git git://git.monstr.eu/linux-2.6-microblaze.git
  S:    Supported
@@@ -5786,20 -5705,20 +5787,20 @@@ L:   linux-rdma@vger.kernel.or
  W:    http://www.mellanox.com
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 -T:    git://openfabrics.org/~eli/connect-ib.git
 +T:    git git://openfabrics.org/~eli/connect-ib.git
  S:    Supported
  F:    drivers/net/ethernet/mellanox/mlx5/core/
  F:    include/linux/mlx5/
  
  Mellanox MLX5 IB driver
 -M:      Eli Cohen <eli@mellanox.com>
 -L:      linux-rdma@vger.kernel.org
 -W:      http://www.mellanox.com
 -Q:      http://patchwork.kernel.org/project/linux-rdma/list/
 -T:      git://openfabrics.org/~eli/connect-ib.git
 -S:      Supported
 -F:      include/linux/mlx5/
 -F:      drivers/infiniband/hw/mlx5/
 +M:    Eli Cohen <eli@mellanox.com>
 +L:    linux-rdma@vger.kernel.org
 +W:    http://www.mellanox.com
 +Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 +T:    git git://openfabrics.org/~eli/connect-ib.git
 +S:    Supported
 +F:    include/linux/mlx5/
 +F:    drivers/infiniband/hw/mlx5/
  
  MODULE SUPPORT
  M:    Rusty Russell <rusty@rustcorp.com.au>
@@@ -5839,26 -5758,6 +5840,26 @@@ L:    platform-driver-x86@vger.kernel.or
  S:    Supported
  F:    drivers/platform/x86/msi-wmi.c
  
 +MSI001 MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/staging/media/msi3101/msi001*
 +
 +MSI3101 MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/staging/media/msi3101/sdr-msi3101*
 +
  MT9M032 APTINA SENSOR DRIVER
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-media@vger.kernel.org
@@@ -6071,9 -5970,6 +6072,9 @@@ F:      include/linux/netdevice.
  F:    include/uapi/linux/in.h
  F:    include/uapi/linux/net.h
  F:    include/uapi/linux/netdevice.h
 +F:    tools/net/
 +F:    tools/testing/selftests/net/
 +F:    lib/random32.c
  
  NETWORKING [IPv4/IPv6]
  M:    "David S. Miller" <davem@davemloft.net>
@@@ -6097,7 -5993,6 +6098,7 @@@ L:      netdev@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git
  S:    Maintained
 +F:    net/core/flow.c
  F:    net/xfrm/
  F:    net/key/
  F:    net/ipv4/xfrm*
@@@ -6173,7 -6068,6 +6174,7 @@@ F:      include/net/nfc
  F:    include/uapi/linux/nfc.h
  F:    drivers/nfc/
  F:    include/linux/platform_data/pn544.h
 +F:    Documentation/devicetree/bindings/net/nfc/
  
  NFS, SUNRPC, AND LOCKD CLIENTS
  M:    Trond Myklebust <trond.myklebust@primarydata.com>
@@@ -6192,10 -6086,10 +6193,10 @@@ F:   include/uapi/linux/nfs
  F:    include/uapi/linux/sunrpc/
  
  NILFS2 FILESYSTEM
 -M:    KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
 +M:    Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  L:    linux-nilfs@vger.kernel.org
 -W:    http://www.nilfs.org/en/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2.git
 +W:    http://nilfs.sourceforge.net/
 +T:    git git://github.com/konis/nilfs2.git
  S:    Supported
  F:    Documentation/filesystems/nilfs2.txt
  F:    fs/nilfs2/
@@@ -6249,12 -6143,6 +6250,12 @@@ S:    Supporte
  F:    drivers/block/nvme*
  F:    include/linux/nvme.h
  
 +NXP TDA998X DRM DRIVER
 +M:    Russell King <rmk+kernel@arm.linux.org.uk>
 +S:    Supported
 +F:    drivers/gpu/drm/i2c/tda998x_drv.c
 +F:    include/drm/i2c/tda998x.h
 +
  OMAP SUPPORT
  M:    Tony Lindgren <tony@atomide.com>
  L:    linux-omap@vger.kernel.org
@@@ -7133,8 -7021,13 +7134,8 @@@ F:     Documentation/networking/LICENSE.qla
  F:    drivers/net/ethernet/qlogic/qla3xxx.*
  
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
 -M:    Himanshu Madhani <himanshu.madhani@qlogic.com>
 -M:    Rajesh Borundia <rajesh.borundia@qlogic.com>
  M:    Shahed Shaikh <shahed.shaikh@qlogic.com>
 -M:    Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
 -M:    Sony Chacko <sony.chacko@qlogic.com>
 -M:    Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
 -M:    linux-driver@qlogic.com
 +M:    Dept-HSGLinuxNICDev@qlogic.com
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/qlogic/qlcnic/
@@@ -7304,7 -7197,7 +7305,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/rdc/r6040.c
  
  RDS - RELIABLE DATAGRAM SOCKETS
 -M:    Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
 +M:    Chien Yen <chien.yen@oracle.com>
  L:    rds-devel@oss.oracle.com (moderated for non-subscribers)
  S:    Supported
  F:    net/rds/
@@@ -7426,16 -7319,6 +7427,16 @@@ T:    git git://linuxtv.org/anttip/media_t
  S:    Maintained
  F:    drivers/media/dvb-frontends/rtl2832*
  
 +RTL2832_SDR MEDIA DRIVER
 +M:    Antti Palosaari <crope@iki.fi>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/staging/media/rtl2832u_sdr/rtl2832_sdr*
 +
  RTL8180 WIRELESS DRIVER
  M:    "John W. Linville" <linville@tuxdriver.com>
  L:    linux-wireless@vger.kernel.org
@@@ -7479,26 -7362,10 +7480,26 @@@ W:   http://www.ibm.com/developerworks/li
  S:    Supported
  F:    arch/s390/
  F:    drivers/s390/
 -F:    block/partitions/ibm.c
  F:    Documentation/s390/
  F:    Documentation/DocBook/s390*
  
 +S390 COMMON I/O LAYER
 +M:    Sebastian Ott <sebott@linux.vnet.ibm.com>
 +M:    Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
 +L:    linux-s390@vger.kernel.org
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    drivers/s390/cio/
 +
 +S390 DASD DRIVER
 +M:    Stefan Weinhuber <wein@de.ibm.com>
 +M:    Stefan Haberland <stefan.haberland@de.ibm.com>
 +L:    linux-s390@vger.kernel.org
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    drivers/s390/block/dasd*
 +F:    block/partitions/ibm.c
 +
  S390 NETWORK DRIVERS
  M:    Ursula Braun <ursula.braun@de.ibm.com>
  M:    Frank Blaschka <blaschka@linux.vnet.ibm.com>
@@@ -7508,15 -7375,6 +7509,15 @@@ W:    http://www.ibm.com/developerworks/li
  S:    Supported
  F:    drivers/s390/net/
  
 +S390 PCI SUBSYSTEM
 +M:    Sebastian Ott <sebott@linux.vnet.ibm.com>
 +M:    Gerald Schaefer <gerald.schaefer@de.ibm.com>
 +L:    linux-s390@vger.kernel.org
 +W:    http://www.ibm.com/developerworks/linux/linux390/
 +S:    Supported
 +F:    arch/s390/pci/
 +F:    drivers/pci/hotplug/s390_pci_hpc.c
 +
  S390 ZCRYPT DRIVER
  M:    Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
  M:    linux390@de.ibm.com
@@@ -7640,15 -7498,6 +7641,15 @@@ S:    Supporte
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  F:    drivers/clk/samsung/
  
 +SAMSUNG SXGBE DRIVERS
 +M:    Byungho An <bh74.an@samsung.com>
 +M:    Girish K S <ks.giri@samsung.com>
 +M:    Siva Reddy Kallam <siva.kallam@samsung.com>
 +M:    Vipul Pandya <vipul.pandya@samsung.com>
 +S:    Supported
 +L:    netdev@vger.kernel.org
 +F:    drivers/net/ethernet/samsung/sxgbe/
 +
  SERIAL DRIVERS
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-serial@vger.kernel.org
@@@ -7838,10 -7687,11 +7839,10 @@@ M:   Security Officers <security@kernel.o
  S:    Supported
  
  SELINUX SECURITY MODULE
 +M:    Paul Moore <paul@paul-moore.com>
  M:    Stephen Smalley <sds@tycho.nsa.gov>
 -M:    James Morris <james.l.morris@oracle.com>
  M:    Eric Paris <eparis@parisplace.org>
 -M:    Paul Moore <paul@paul-moore.com>
 -L:    selinux@tycho.nsa.gov (subscribers-only, general discussion)
 +L:    selinux@tycho.nsa.gov (moderated for non-subscribers)
  W:    http://selinuxproject.org
  T:    git git://git.infradead.org/users/pcmoore/selinux
  S:    Supported
@@@ -7908,6 -7758,13 +7909,6 @@@ F:     Documentation/ia64/serial.tx
  F:    drivers/tty/serial/ioc?_serial.c
  F:    include/linux/ioc?.h
  
 -SGI VISUAL WORKSTATION 320 AND 540
 -M:    Andrey Panin <pazke@donpac.ru>
 -L:    linux-visws-devel@lists.sf.net
 -W:    http://linux-visws.sf.net
 -S:    Maintained for 2.6.
 -F:    Documentation/sgi-visws.txt
 -
  SGI XP/XPC/XPNET DRIVER
  M:    Cliff Whickman <cpw@sgi.com>
  M:    Robin Holt <robinmholt@gmail.com>
@@@ -7968,13 -7825,15 +7969,13 @@@ F:   drivers/media/usb/siano
  F:    drivers/media/mmc/siano/
  
  SH_VEU V4L2 MEM2MEM DRIVER
 -M:    Guennadi Liakhovetski <g.liakhovetski@gmx.de>
  L:    linux-media@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/media/platform/sh_veu.c
  
  SH_VOU V4L2 OUTPUT DRIVER
 -M:    Guennadi Liakhovetski <g.liakhovetski@gmx.de>
  L:    linux-media@vger.kernel.org
 -S:    Odd Fixes
 +S:    Orphan
  F:    drivers/media/platform/sh_vou.c
  F:    include/media/sh_vou.h
  
@@@ -8453,12 -8312,6 +8454,12 @@@ M:    Teddy Wang <teddy.wang@siliconmotion
  S:    Odd Fixes
  F:    drivers/staging/sm7xxfb/
  
 +STAGING - SLICOSS
 +M:    Lior Dotan <liodot@gmail.com>
 +M:    Christopher Harrer <charrer@alacritech.com>
 +S:    Odd Fixes
 +F:    drivers/staging/slicoss/
 +
  STAGING - SOFTLOGIC 6x10 MPEG CODEC
  M:    Ismael Luceno <ismael.luceno@corp.bluecherry.net>
  S:    Supported
@@@ -8520,18 -8373,20 +8521,18 @@@ S:   Maintaine
  F:    drivers/net/ethernet/dlink/sundance.c
  
  SUPERH
 -M:    Paul Mundt <lethal@linux-sh.org>
  L:    linux-sh@vger.kernel.org
  W:    http://www.linux-sh.org
  Q:    http://patchwork.kernel.org/project/linux-sh/list/
 -T:    git git://github.com/pmundt/linux-sh.git sh-latest
 -S:    Supported
 +S:    Orphan
  F:    Documentation/sh/
  F:    arch/sh/
  F:    drivers/sh/
  
  SUSPEND TO RAM
 +M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
  M:    Len Brown <len.brown@intel.com>
  M:    Pavel Machek <pavel@ucw.cz>
 -M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    Documentation/power/
@@@ -8575,8 -8430,8 +8576,8 @@@ TARGET SUBSYSTE
  M:    Nicholas A. Bellinger <nab@linux-iscsi.org>
  L:    linux-scsi@vger.kernel.org
  L:    target-devel@vger.kernel.org
 -L:    http://groups.google.com/group/linux-iscsi-target-dev
  W:    http://www.linux-iscsi.org
 +W:    http://groups.google.com/group/linux-iscsi-target-dev
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master
  S:    Supported
  F:    drivers/target/
@@@ -8807,7 -8662,6 +8808,7 @@@ M:      Max Filippov <jcmvbkbc@gmail.com
  L:    linux-xtensa@linux-xtensa.org
  S:    Maintained
  F:    arch/xtensa/
 +F:    drivers/irqchip/irq-xtensa-*
  
  THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
@@@ -8818,17 -8672,17 +8819,17 @@@ S:   Maintaine
  F:    drivers/media/radio/radio-raremono.c
  
  THERMAL
 -M:      Zhang Rui <rui.zhang@intel.com>
 -M:      Eduardo Valentin <eduardo.valentin@ti.com>
 -L:      linux-pm@vger.kernel.org
 -T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
 -T:      git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
 -Q:      https://patchwork.kernel.org/project/linux-pm/list/
 -S:      Supported
 -F:      drivers/thermal/
 -F:      include/linux/thermal.h
 -F:      include/linux/cpu_cooling.h
 -F:      Documentation/devicetree/bindings/thermal/
 +M:    Zhang Rui <rui.zhang@intel.com>
 +M:    Eduardo Valentin <eduardo.valentin@ti.com>
 +L:    linux-pm@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
 +Q:    https://patchwork.kernel.org/project/linux-pm/list/
 +S:    Supported
 +F:    drivers/thermal/
 +F:    include/linux/thermal.h
 +F:    include/linux/cpu_cooling.h
 +F:    Documentation/devicetree/bindings/thermal/
  
  THINGM BLINK(1) USB RGB LED DRIVER
  M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
@@@ -9143,13 -8997,6 +9144,13 @@@ F:    drivers/cdrom/cdrom.
  F:    include/linux/cdrom.h
  F:    include/uapi/linux/cdrom.h
  
 +UNISYS S-PAR DRIVERS
 +M:     Benjamin Romer <benjamin.romer@unisys.com>
 +M:     David Kershner <david.kershner@unisys.com>
 +L:     sparmaintainer@unisys.com (Unisys internal)
 +S:     Supported
 +F:     drivers/staging/unisys/
 +
  UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
  M:    Vinayak Holikatti <vinholikatti@gmail.com>
  M:    Santosh Y <santoshsy@gmail.com>
@@@ -9188,7 -9035,8 +9189,7 @@@ S:      Maintaine
  F:    drivers/net/wireless/ath/ar5523/
  
  USB ATTACHED SCSI
 -M:    Matthew Wilcox <willy@linux.intel.com>
 -M:    Sarah Sharp <sarah.a.sharp@linux.intel.com>
 +M:    Hans de Goede <hdegoede@redhat.com>
  M:    Gerd Hoffmann <kraxel@redhat.com>
  L:    linux-usb@vger.kernel.org
  L:    linux-scsi@vger.kernel.org
@@@ -9414,7 -9262,7 +9415,7 @@@ S:      Maintaine
  F:    drivers/net/wireless/rndis_wlan.c
  
  USB XHCI DRIVER
 -M:    Sarah Sharp <sarah.a.sharp@linux.intel.com>
 +M:    Mathias Nyman <mathias.nyman@intel.com>
  L:    linux-usb@vger.kernel.org
  S:    Supported
  F:    drivers/usb/host/xhci*
@@@ -9498,6 -9346,7 +9499,6 @@@ F:      include/media/videobuf2-
  
  VIRTIO CONSOLE DRIVER
  M:    Amit Shah <amit.shah@redhat.com>
 -L:    virtio-dev@lists.oasis-open.org
  L:    virtualization@lists.linux-foundation.org
  S:    Maintained
  F:    drivers/char/virtio_console.c
@@@ -9507,6 -9356,7 +9508,6 @@@ F:      include/uapi/linux/virtio_console.
  VIRTIO CORE, NET AND BLOCK DRIVERS
  M:    Rusty Russell <rusty@rustcorp.com.au>
  M:    "Michael S. Tsirkin" <mst@redhat.com>
 -L:    virtio-dev@lists.oasis-open.org
  L:    virtualization@lists.linux-foundation.org
  S:    Maintained
  F:    drivers/virtio/
@@@ -9519,6 -9369,7 +9520,6 @@@ F:      include/uapi/linux/virtio_*.
  VIRTIO HOST (VHOST)
  M:    "Michael S. Tsirkin" <mst@redhat.com>
  L:    kvm@vger.kernel.org
 -L:    virtio-dev@lists.oasis-open.org
  L:    virtualization@lists.linux-foundation.org
  L:    netdev@vger.kernel.org
  S:    Maintained
@@@ -9699,7 -9550,7 +9700,7 @@@ F:      drivers/media/rc/winbond-cir.
  WIMAX STACK
  M:    Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
  M:    linux-wimax@intel.com
 -L:    wimax@linuxwimax.org
 +L:     wimax@linuxwimax.org (subscribers-only)
  S:    Supported
  W:    http://linuxwimax.org
  F:    Documentation/wimax/README.wimax
@@@ -9865,6 -9716,7 +9866,6 @@@ F:      drivers/xen/*swiotlb
  XFS FILESYSTEM
  P:    Silicon Graphics Inc
  M:    Dave Chinner <david@fromorbit.com>
 -M:    Ben Myers <bpm@sgi.com>
  M:    xfs@oss.sgi.com
  L:    xfs@oss.sgi.com
  W:    http://oss.sgi.com/projects/xfs
@@@ -9889,12 -9741,6 +9890,12 @@@ L:    linux-serial@vger.kernel.or
  S:    Maintained
  F:    drivers/tty/serial/uartlite.c
  
 +XTENSA XTFPGA PLATFORM SUPPORT
 +M:    Max Filippov <jcmvbkbc@gmail.com>
 +L:    linux-xtensa@linux-xtensa.org
 +S:    Maintained
 +F:    drivers/spi/spi-xtensa-xtfpga.c
 +
  YAM DRIVER FOR AX.25
  M:    Jean-Paul Roubelat <jpr@f6fbb.org>
  L:    linux-hams@vger.kernel.org
@@@ -9939,7 -9785,7 +9940,7 @@@ ZR36067 VIDEO FOR LINUX DRIVE
  L:    mjpeg-users@lists.sourceforge.net
  L:    linux-media@vger.kernel.org
  W:    http://mjpeg.sourceforge.net/driver-zoran/
 -T:    Mercurial http://linuxtv.org/hg/v4l-dvb
 +T:    hg http://linuxtv.org/hg/v4l-dvb
  S:    Odd Fixes
  F:    drivers/media/pci/zoran/
  
diff --combined fs/compat.c
@@@ -72,8 -72,8 +72,8 @@@ int compat_printk(const char *fmt, ...
   * Not all architectures have sys_utime, so implement this in terms
   * of sys_utimes.
   */
 -asmlinkage long compat_sys_utime(const char __user *filename,
 -                               struct compat_utimbuf __user *t)
 +COMPAT_SYSCALL_DEFINE2(utime, const char __user *, filename,
 +                     struct compat_utimbuf __user *, t)
  {
        struct timespec tv[2];
  
        return do_utimes(AT_FDCWD, filename, t ? tv : NULL, 0);
  }
  
 -asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename, struct compat_timespec __user *t, int flags)
 +COMPAT_SYSCALL_DEFINE4(utimensat, unsigned int, dfd, const char __user *, filename, struct compat_timespec __user *, t, int, flags)
  {
        struct timespec tv[2];
  
        if  (t) {
 -              if (get_compat_timespec(&tv[0], &t[0]) ||
 -                  get_compat_timespec(&tv[1], &t[1]))
 +              if (compat_get_timespec(&tv[0], &t[0]) ||
 +                  compat_get_timespec(&tv[1], &t[1]))
                        return -EFAULT;
  
                if (tv[0].tv_nsec == UTIME_OMIT && tv[1].tv_nsec == UTIME_OMIT)
        return do_utimes(dfd, filename, t ? tv : NULL, flags);
  }
  
 -asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename, struct compat_timeval __user *t)
 +COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, const char __user *, filename, struct compat_timeval __user *, t)
  {
        struct timespec tv[2];
  
        return do_utimes(dfd, filename, t ? tv : NULL, 0);
  }
  
 -asmlinkage long compat_sys_utimes(const char __user *filename, struct compat_timeval __user *t)
 +COMPAT_SYSCALL_DEFINE2(utimes, const char __user *, filename, struct compat_timeval __user *, t)
  {
        return compat_sys_futimesat(AT_FDCWD, filename, t);
  }
@@@ -159,8 -159,8 +159,8 @@@ static int cp_compat_stat(struct kstat 
        return copy_to_user(ubuf, &tmp, sizeof(tmp)) ? -EFAULT : 0;
  }
  
 -asmlinkage long compat_sys_newstat(const char __user * filename,
 -              struct compat_stat __user *statbuf)
 +COMPAT_SYSCALL_DEFINE2(newstat, const char __user *, filename,
 +                     struct compat_stat __user *, statbuf)
  {
        struct kstat stat;
        int error;
        return cp_compat_stat(&stat, statbuf);
  }
  
 -asmlinkage long compat_sys_newlstat(const char __user * filename,
 -              struct compat_stat __user *statbuf)
 +COMPAT_SYSCALL_DEFINE2(newlstat, const char __user *, filename,
 +                     struct compat_stat __user *, statbuf)
  {
        struct kstat stat;
        int error;
  }
  
  #ifndef __ARCH_WANT_STAT64
 -asmlinkage long compat_sys_newfstatat(unsigned int dfd,
 -              const char __user *filename,
 -              struct compat_stat __user *statbuf, int flag)
 +COMPAT_SYSCALL_DEFINE4(newfstatat, unsigned int, dfd,
 +                     const char __user *, filename,
 +                     struct compat_stat __user *, statbuf, int, flag)
  {
        struct kstat stat;
        int error;
  }
  #endif
  
 -asmlinkage long compat_sys_newfstat(unsigned int fd,
 -              struct compat_stat __user * statbuf)
 +COMPAT_SYSCALL_DEFINE2(newfstat, unsigned int, fd,
 +                     struct compat_stat __user *, statbuf)
  {
        struct kstat stat;
        int error = vfs_fstat(fd, &stat);
@@@ -247,7 -247,7 +247,7 @@@ static int put_compat_statfs(struct com
   * The following statfs calls are copies of code from fs/statfs.c and
   * should be checked against those from time to time
   */
 -asmlinkage long compat_sys_statfs(const char __user *pathname, struct compat_statfs __user *buf)
 +COMPAT_SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct compat_statfs __user *, buf)
  {
        struct kstatfs tmp;
        int error = user_statfs(pathname, &tmp);
        return error;
  }
  
 -asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user *buf)
 +COMPAT_SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct compat_statfs __user *, buf)
  {
        struct kstatfs tmp;
        int error = fd_statfs(fd, &tmp);
@@@ -298,7 -298,7 +298,7 @@@ static int put_compat_statfs64(struct c
        return 0;
  }
  
 -asmlinkage long compat_sys_statfs64(const char __user *pathname, compat_size_t sz, struct compat_statfs64 __user *buf)
 +COMPAT_SYSCALL_DEFINE3(statfs64, const char __user *, pathname, compat_size_t, sz, struct compat_statfs64 __user *, buf)
  {
        struct kstatfs tmp;
        int error;
        return error;
  }
  
 -asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 __user *buf)
 +COMPAT_SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, compat_size_t, sz, struct compat_statfs64 __user *, buf)
  {
        struct kstatfs tmp;
        int error;
   * Given how simple this syscall is that apporach is more maintainable
   * than the various conversion hacks.
   */
 -asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u)
 +COMPAT_SYSCALL_DEFINE2(ustat, unsigned, dev, struct compat_ustat __user *, u)
  {
        struct compat_ustat tmp;
        struct kstatfs sbuf;
@@@ -399,12 -399,28 +399,28 @@@ static int put_compat_flock64(struct fl
  }
  #endif
  
 -asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,
 -              unsigned long arg)
+ static unsigned int
+ convert_fcntl_cmd(unsigned int cmd)
+ {
+       switch (cmd) {
+       case F_GETLK64:
+               return F_GETLK;
+       case F_SETLK64:
+               return F_SETLK;
+       case F_SETLKW64:
+               return F_SETLKW;
+       }
+       return cmd;
+ }
 +COMPAT_SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd,
 +                     compat_ulong_t, arg)
  {
        mm_segment_t old_fs;
        struct flock f;
        long ret;
+       unsigned int conv_cmd;
  
        switch (cmd) {
        case F_GETLK:
        case F_GETLK64:
        case F_SETLK64:
        case F_SETLKW64:
+       case F_GETLKP:
+       case F_SETLKP:
+       case F_SETLKPW:
                ret = get_compat_flock64(&f, compat_ptr(arg));
                if (ret != 0)
                        break;
                old_fs = get_fs();
                set_fs(KERNEL_DS);
-               ret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK :
-                               ((cmd == F_SETLK64) ? F_SETLK : F_SETLKW),
-                               (unsigned long)&f);
+               conv_cmd = convert_fcntl_cmd(cmd);
+               ret = sys_fcntl(fd, conv_cmd, (unsigned long)&f);
                set_fs(old_fs);
-               if (cmd == F_GETLK64 && ret == 0) {
+               if ((conv_cmd == F_GETLK || conv_cmd == F_GETLKP) && ret == 0) {
                        /* need to return lock information - see above for commentary */
                        if (f.l_start > COMPAT_LOFF_T_MAX)
                                ret = -EOVERFLOW;
        return ret;
  }
  
 -asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
 -              unsigned long arg)
 +COMPAT_SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd,
 +                     compat_ulong_t, arg)
  {
-       if ((cmd == F_GETLK64) || (cmd == F_SETLK64) || (cmd == F_SETLKW64))
+       switch (cmd) {
+       case F_GETLK64:
+       case F_SETLK64:
+       case F_SETLKW64:
+       case F_GETLKP:
+       case F_SETLKP:
+       case F_SETLKPW:
                return -EINVAL;
+       }
        return compat_sys_fcntl64(fd, cmd, arg);
  }
  
 -asmlinkage long
 -compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p)
 +COMPAT_SYSCALL_DEFINE2(io_setup, unsigned, nr_reqs, u32 __user *, ctx32p)
  {
        long ret;
        aio_context_t ctx64;
        return ret;
  }
  
 -asmlinkage long
 -compat_sys_io_getevents(aio_context_t ctx_id,
 -                               unsigned long min_nr,
 -                               unsigned long nr,
 -                               struct io_event __user *events,
 -                               struct compat_timespec __user *timeout)
 +COMPAT_SYSCALL_DEFINE5(io_getevents, compat_aio_context_t, ctx_id,
 +                     compat_long_t, min_nr,
 +                     compat_long_t, nr,
 +                     struct io_event __user *, events,
 +                     struct compat_timespec __user *, timeout)
  {
 -      long ret;
        struct timespec t;
        struct timespec __user *ut = NULL;
  
 -      ret = -EFAULT;
 -      if (unlikely(!access_ok(VERIFY_WRITE, events, 
 -                              nr * sizeof(struct io_event))))
 -              goto out;
        if (timeout) {
 -              if (get_compat_timespec(&t, timeout))
 -                      goto out;
 +              if (compat_get_timespec(&t, timeout))
 +                      return -EFAULT;
  
                ut = compat_alloc_user_space(sizeof(*ut));
                if (copy_to_user(ut, &t, sizeof(t)) )
 -                      goto out;
 +                      return -EFAULT;
        } 
 -      ret = sys_io_getevents(ctx_id, min_nr, nr, events, ut);
 -out:
 -      return ret;
 +      return sys_io_getevents(ctx_id, min_nr, nr, events, ut);
  }
  
  /* A write operation does a read from user space and vice versa */
@@@ -608,8 -642,8 +633,8 @@@ copy_iocb(long nr, u32 __user *ptr32, s
  
  #define MAX_AIO_SUBMITS       (PAGE_SIZE/sizeof(struct iocb *))
  
 -asmlinkage long
 -compat_sys_io_submit(aio_context_t ctx_id, int nr, u32 __user *iocb)
 +COMPAT_SYSCALL_DEFINE3(io_submit, compat_aio_context_t, ctx_id,
 +                     int, nr, u32 __user *, iocb)
  {
        struct iocb __user * __user *iocb64; 
        long ret;
@@@ -761,10 -795,10 +786,10 @@@ static int do_nfs4_super_data_conv(voi
  #define NCPFS_NAME      "ncpfs"
  #define NFS4_NAME     "nfs4"
  
 -asmlinkage long compat_sys_mount(const char __user * dev_name,
 -                               const char __user * dir_name,
 -                               const char __user * type, unsigned long flags,
 -                               const void __user * data)
 +COMPAT_SYSCALL_DEFINE5(mount, const char __user *, dev_name,
 +                     const char __user *, dir_name,
 +                     const char __user *, type, compat_ulong_t, flags,
 +                     const void __user *, data)
  {
        char *kernel_type;
        unsigned long data_page;
@@@ -860,8 -894,8 +885,8 @@@ efault
        return -EFAULT;
  }
  
 -asmlinkage long compat_sys_old_readdir(unsigned int fd,
 -      struct compat_old_linux_dirent __user *dirent, unsigned int count)
 +COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
 +              struct compat_old_linux_dirent __user *, dirent, unsigned int, count)
  {
        int error;
        struct fd f = fdget(fd);
@@@ -939,8 -973,8 +964,8 @@@ efault
        return -EFAULT;
  }
  
 -asmlinkage long compat_sys_getdents(unsigned int fd,
 -              struct compat_linux_dirent __user *dirent, unsigned int count)
 +COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
 +              struct compat_linux_dirent __user *, dirent, unsigned int, count)
  {
        struct fd f;
        struct compat_linux_dirent __user * lastdirent;
        return error;
  }
  
 -#ifndef __ARCH_OMIT_COMPAT_SYS_GETDENTS64
 +#ifdef __ARCH_WANT_COMPAT_SYS_GETDENTS64
  
  struct compat_getdents_callback64 {
        struct dir_context ctx;
@@@ -1024,8 -1058,8 +1049,8 @@@ efault
        return -EFAULT;
  }
  
 -asmlinkage long compat_sys_getdents64(unsigned int fd,
 -              struct linux_dirent64 __user * dirent, unsigned int count)
 +COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
 +              struct linux_dirent64 __user *, dirent, unsigned int, count)
  {
        struct fd f;
        struct linux_dirent64 __user * lastdirent;
        fdput(f);
        return error;
  }
 -#endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */
 +#endif /* __ARCH_WANT_COMPAT_SYS_GETDENTS64 */
  
  /*
   * Exactly like fs/open.c:sys_open(), except that it doesn't set the
@@@ -1278,9 -1312,9 +1303,9 @@@ out_nofds
        return ret;
  }
  
 -asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
 -      compat_ulong_t __user *outp, compat_ulong_t __user *exp,
 -      struct compat_timeval __user *tvp)
 +COMPAT_SYSCALL_DEFINE5(select, int, n, compat_ulong_t __user *, inp,
 +      compat_ulong_t __user *, outp, compat_ulong_t __user *, exp,
 +      struct compat_timeval __user *tvp)
  {
        struct timespec end_time, *to = NULL;
        struct compat_timeval tv;
@@@ -1311,7 -1345,7 +1336,7 @@@ struct compat_sel_arg_struct 
        compat_uptr_t tvp;
  };
  
 -asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg)
 +COMPAT_SYSCALL_DEFINE1(old_select, struct compat_sel_arg_struct __user *, arg)
  {
        struct compat_sel_arg_struct a;
  
@@@ -1372,9 -1406,9 +1397,9 @@@ static long do_compat_pselect(int n, co
        return ret;
  }
  
 -asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,
 -      compat_ulong_t __user *outp, compat_ulong_t __user *exp,
 -      struct compat_timespec __user *tsp, void __user *sig)
 +COMPAT_SYSCALL_DEFINE6(pselect6, int, n, compat_ulong_t __user *, inp,
 +      compat_ulong_t __user *, outp, compat_ulong_t __user *, exp,
 +      struct compat_timespec __user *, tsp, void __user *, sig)
  {
        compat_size_t sigsetsize = 0;
        compat_uptr_t up = 0;
                                 sigsetsize);
  }
  
 -asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
 -      unsigned int nfds, struct compat_timespec __user *tsp,
 -      const compat_sigset_t __user *sigmask, compat_size_t sigsetsize)
 +COMPAT_SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds,
 +      unsigned int,  nfds, struct compat_timespec __user *, tsp,
 +      const compat_sigset_t __user *, sigmask, compat_size_t, sigsetsize)
  {
        compat_sigset_t ss32;
        sigset_t ksigmask, sigsaved;
diff --combined fs/file_table.c
@@@ -135,7 -135,6 +135,7 @@@ struct file *get_empty_filp(void
        atomic_long_set(&f->f_count, 1);
        rwlock_init(&f->f_owner.lock);
        spin_lock_init(&f->f_lock);
 +      mutex_init(&f->f_pos_lock);
        eventpoll_init_file(f);
        /* f->f_version: 0 */
        return f;
@@@ -235,7 -234,7 +235,7 @@@ static void __fput(struct file *file
         * in the file cleanup chain.
         */
        eventpoll_release(file);
-       locks_remove_flock(file);
+       locks_remove_file(file);
  
        if (unlikely(file->f_flags & FASYNC)) {
                if (file->f_op->fasync)
diff --combined fs/namei.c
@@@ -196,7 -196,6 +196,7 @@@ recopy
                goto error;
  
        result->uptr = filename;
 +      result->aname = NULL;
        audit_getname(result);
        return result;
  
@@@ -211,35 -210,6 +211,35 @@@ getname(const char __user * filename
        return getname_flags(filename, 0, NULL);
  }
  
 +/*
 + * The "getname_kernel()" interface doesn't do pathnames longer
 + * than EMBEDDED_NAME_MAX. Deal with it - you're a kernel user.
 + */
 +struct filename *
 +getname_kernel(const char * filename)
 +{
 +      struct filename *result;
 +      char *kname;
 +      int len;
 +
 +      len = strlen(filename);
 +      if (len >= EMBEDDED_NAME_MAX)
 +              return ERR_PTR(-ENAMETOOLONG);
 +
 +      result = __getname();
 +      if (unlikely(!result))
 +              return ERR_PTR(-ENOMEM);
 +
 +      kname = (char *)result + sizeof(*result);
 +      result->name = kname;
 +      result->uptr = NULL;
 +      result->aname = NULL;
 +      result->separate = false;
 +
 +      strlcpy(kname, filename, EMBEDDED_NAME_MAX);
 +      return result;
 +}
 +
  #ifdef CONFIG_AUDITSYSCALL
  void putname(struct filename *name)
  {
@@@ -1109,7 -1079,7 +1109,7 @@@ static bool __follow_mount_rcu(struct n
                        return false;
  
                if (!d_mountpoint(path->dentry))
 -                      break;
 +                      return true;
  
                mounted = __lookup_mnt(path->mnt, path->dentry);
                if (!mounted)
                 */
                *inode = path->dentry->d_inode;
        }
 -      return true;
 -}
 -
 -static void follow_mount_rcu(struct nameidata *nd)
 -{
 -      while (d_mountpoint(nd->path.dentry)) {
 -              struct mount *mounted;
 -              mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry);
 -              if (!mounted)
 -                      break;
 -              nd->path.mnt = &mounted->mnt;
 -              nd->path.dentry = mounted->mnt.mnt_root;
 -              nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
 -      }
 +      return read_seqretry(&mount_lock, nd->m_seq);
  }
  
  static int follow_dotdot_rcu(struct nameidata *nd)
                        break;
                nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
        }
 -      follow_mount_rcu(nd);
 +      while (d_mountpoint(nd->path.dentry)) {
 +              struct mount *mounted;
 +              mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry);
 +              if (!mounted)
 +                      break;
 +              nd->path.mnt = &mounted->mnt;
 +              nd->path.dentry = mounted->mnt.mnt_root;
 +              nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
 +              if (!read_seqretry(&mount_lock, nd->m_seq))
 +                      goto failed;
 +      }
        nd->inode = nd->path.dentry->d_inode;
        return 0;
  
@@@ -1796,7 -1769,7 +1796,7 @@@ static int link_path_walk(const char *n
                        if (err)
                                return err;
                }
 -              if (!d_is_directory(nd->path.dentry)) {
 +              if (!d_can_lookup(nd->path.dentry)) {
                        err = -ENOTDIR; 
                        break;
                }
@@@ -1817,7 -1790,7 +1817,7 @@@ static int path_init(int dfd, const cha
                struct dentry *root = nd->root.dentry;
                struct inode *inode = root->d_inode;
                if (*name) {
 -                      if (!d_is_directory(root))
 +                      if (!d_can_lookup(root))
                                return -ENOTDIR;
                        retval = inode_permission(inode, MAY_EXEC);
                        if (retval)
                dentry = f.file->f_path.dentry;
  
                if (*name) {
 -                      if (!d_is_directory(dentry)) {
 +                      if (!d_can_lookup(dentry)) {
                                fdput(f);
                                return -ENOTDIR;
                        }
  
                nd->path = f.file->f_path;
                if (flags & LOOKUP_RCU) {
 -                      if (f.need_put)
 +                      if (f.flags & FDPUT_FPUT)
                                *fp = f.file;
                        nd->seq = __read_seqcount_begin(&nd->path.dentry->d_seq);
                        rcu_read_lock();
@@@ -1955,7 -1928,7 +1955,7 @@@ static int path_lookupat(int dfd, cons
                err = complete_walk(nd);
  
        if (!err && nd->flags & LOOKUP_DIRECTORY) {
 -              if (!d_is_directory(nd->path.dentry)) {
 +              if (!d_can_lookup(nd->path.dentry)) {
                        path_put(&nd->path);
                        err = -ENOTDIR;
                }
@@@ -2414,11 -2387,11 +2414,11 @@@ static int may_delete(struct inode *dir
            IS_IMMUTABLE(inode) || IS_SWAPFILE(inode))
                return -EPERM;
        if (isdir) {
 -              if (!d_is_directory(victim) && !d_is_autodir(victim))
 +              if (!d_is_dir(victim))
                        return -ENOTDIR;
                if (IS_ROOT(victim))
                        return -EBUSY;
 -      } else if (d_is_directory(victim) || d_is_autodir(victim))
 +      } else if (d_is_dir(victim))
                return -EISDIR;
        if (IS_DEADDIR(dir))
                return -ENOENT;
@@@ -2569,7 -2542,7 +2569,7 @@@ static int handle_truncate(struct file 
        /*
         * Refuse to truncate files with mandatory locks held on them.
         */
-       error = locks_verify_locked(inode);
+       error = locks_verify_locked(filp);
        if (!error)
                error = security_path_truncate(path);
        if (!error) {
@@@ -3016,10 -2989,11 +3016,10 @@@ finish_open
        }
        audit_inode(name, nd->path.dentry, 0);
        error = -EISDIR;
 -      if ((open_flag & O_CREAT) &&
 -          (d_is_directory(nd->path.dentry) || d_is_autodir(nd->path.dentry)))
 +      if ((open_flag & O_CREAT) && d_is_dir(nd->path.dentry))
                goto out;
        error = -ENOTDIR;
 -      if ((nd->flags & LOOKUP_DIRECTORY) && !d_is_directory(nd->path.dentry))
 +      if ((nd->flags & LOOKUP_DIRECTORY) && !d_can_lookup(nd->path.dentry))
                goto out;
        if (!S_ISREG(nd->inode->i_mode))
                will_truncate = false;
@@@ -3743,7 -3717,7 +3743,7 @@@ exit1
  slashes:
        if (d_is_negative(dentry))
                error = -ENOENT;
 -      else if (d_is_directory(dentry) || d_is_autodir(dentry))
 +      else if (d_is_dir(dentry))
                error = -EISDIR;
        else
                error = -ENOTDIR;
@@@ -3973,28 -3947,7 +3973,28 @@@ SYSCALL_DEFINE2(link, const char __use
        return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
  }
  
 -/*
 +/**
 + * vfs_rename - rename a filesystem object
 + * @old_dir:  parent of source
 + * @old_dentry:       source
 + * @new_dir:  parent of destination
 + * @new_dentry:       destination
 + * @delegated_inode: returns an inode needing a delegation break
 + * @flags:    rename flags
 + *
 + * The caller must hold multiple mutexes--see lock_rename()).
 + *
 + * If vfs_rename discovers a delegation in need of breaking at either
 + * the source or destination, it will return -EWOULDBLOCK and return a
 + * reference to the inode in delegated_inode.  The caller should then
 + * break the delegation and retry.  Because breaking a delegation may
 + * take a long time, the caller should drop all locks before doing
 + * so.
 + *
 + * Alternatively, a caller may pass NULL for delegated_inode.  This may
 + * be appropriate for callers that expect the underlying filesystem not
 + * to be NFS exported.
 + *
   * The worst of all namespace operations - renaming directory. "Perverted"
   * doesn't even start to describe it. Somebody in UCB had a heck of a trip...
   * Problems:
   *       ->i_mutex on parents, which works but leads to some truly excessive
   *       locking].
   */
 -static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
 -                        struct inode *new_dir, struct dentry *new_dentry)
 +int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 +             struct inode *new_dir, struct dentry *new_dentry,
 +             struct inode **delegated_inode, unsigned int flags)
  {
 -      int error = 0;
 +      int error;
 +      bool is_dir = d_is_dir(old_dentry);
 +      const unsigned char *old_name;
 +      struct inode *source = old_dentry->d_inode;
        struct inode *target = new_dentry->d_inode;
 +      bool new_is_dir = false;
        unsigned max_links = new_dir->i_sb->s_max_links;
  
 +      if (source == target)
 +              return 0;
 +
 +      error = may_delete(old_dir, old_dentry, is_dir);
 +      if (error)
 +              return error;
 +
 +      if (!target) {
 +              error = may_create(new_dir, new_dentry);
 +      } else {
 +              new_is_dir = d_is_dir(new_dentry);
 +
 +              if (!(flags & RENAME_EXCHANGE))
 +                      error = may_delete(new_dir, new_dentry, is_dir);
 +              else
 +                      error = may_delete(new_dir, new_dentry, new_is_dir);
 +      }
 +      if (error)
 +              return error;
 +
 +      if (!old_dir->i_op->rename)
 +              return -EPERM;
 +
 +      if (flags && !old_dir->i_op->rename2)
 +              return -EINVAL;
 +
        /*
         * If we are going to change the parent - check write permissions,
         * we'll need to flip '..'.
         */
        if (new_dir != old_dir) {
 -              error = inode_permission(old_dentry->d_inode, MAY_WRITE);
 -              if (error)
 -                      return error;
 +              if (is_dir) {
 +                      error = inode_permission(source, MAY_WRITE);
 +                      if (error)
 +                              return error;
 +              }
 +              if ((flags & RENAME_EXCHANGE) && new_is_dir) {
 +                      error = inode_permission(target, MAY_WRITE);
 +                      if (error)
 +                              return error;
 +              }
        }
  
 -      error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry);
 +      error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry,
 +                                    flags);
        if (error)
                return error;
  
 +      old_name = fsnotify_oldname_init(old_dentry->d_name.name);
        dget(new_dentry);
 -      if (target)
 +      if (!is_dir || (flags & RENAME_EXCHANGE))
 +              lock_two_nondirectories(source, target);
 +      else if (target)
                mutex_lock(&target->i_mutex);
  
        error = -EBUSY;
        if (d_mountpoint(old_dentry) || d_mountpoint(new_dentry))
                goto out;
  
 -      error = -EMLINK;
 -      if (max_links && !target && new_dir != old_dir &&
 -          new_dir->i_nlink >= max_links)
 -              goto out;
 -
 -      if (target)
 +      if (max_links && new_dir != old_dir) {
 +              error = -EMLINK;
 +              if (is_dir && !new_is_dir && new_dir->i_nlink >= max_links)
 +                      goto out;
 +              if ((flags & RENAME_EXCHANGE) && !is_dir && new_is_dir &&
 +                  old_dir->i_nlink >= max_links)
 +                      goto out;
 +      }
 +      if (is_dir && !(flags & RENAME_EXCHANGE) && target)
                shrink_dcache_parent(new_dentry);
 -      error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry);
 -      if (error)
 -              goto out;
 -
 -      if (target) {
 -              target->i_flags |= S_DEAD;
 -              dont_mount(new_dentry);
 +      if (!is_dir) {
 +              error = try_break_deleg(source, delegated_inode);
 +              if (error)
 +                      goto out;
        }
 -out:
 -      if (target)
 -              mutex_unlock(&target->i_mutex);
 -      dput(new_dentry);
 -      if (!error)
 -              if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE))
 -                      d_move(old_dentry,new_dentry);
 -      return error;
 -}
 -
 -static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
 -                          struct inode *new_dir, struct dentry *new_dentry,
 -                          struct inode **delegated_inode)
 -{
 -      struct inode *target = new_dentry->d_inode;
 -      struct inode *source = old_dentry->d_inode;
 -      int error;
 -
 -      error = security_inode_rename(old_dir, old_dentry, new_dir, new_dentry);
 -      if (error)
 -              return error;
 -
 -      dget(new_dentry);
 -      lock_two_nondirectories(source, target);
 -
 -      error = -EBUSY;
 -      if (d_mountpoint(old_dentry)||d_mountpoint(new_dentry))
 -              goto out;
 -
 -      error = try_break_deleg(source, delegated_inode);
 -      if (error)
 -              goto out;
 -      if (target) {
 +      if (target && !new_is_dir) {
                error = try_break_deleg(target, delegated_inode);
                if (error)
                        goto out;
        }
 -      error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry);
 +      if (!flags) {
 +              error = old_dir->i_op->rename(old_dir, old_dentry,
 +                                            new_dir, new_dentry);
 +      } else {
 +              error = old_dir->i_op->rename2(old_dir, old_dentry,
 +                                             new_dir, new_dentry, flags);
 +      }
        if (error)
                goto out;
  
 -      if (target)
 +      if (!(flags & RENAME_EXCHANGE) && target) {
 +              if (is_dir)
 +                      target->i_flags |= S_DEAD;
                dont_mount(new_dentry);
 -      if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE))
 -              d_move(old_dentry, new_dentry);
 +      }
 +      if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE)) {
 +              if (!(flags & RENAME_EXCHANGE))
 +                      d_move(old_dentry, new_dentry);
 +              else
 +                      d_exchange(old_dentry, new_dentry);
 +      }
  out:
 -      unlock_two_nondirectories(source, target);
 +      if (!is_dir || (flags & RENAME_EXCHANGE))
 +              unlock_two_nondirectories(source, target);
 +      else if (target)
 +              mutex_unlock(&target->i_mutex);
        dput(new_dentry);
 -      return error;
 -}
 -
 -/**
 - * vfs_rename - rename a filesystem object
 - * @old_dir:  parent of source
 - * @old_dentry:       source
 - * @new_dir:  parent of destination
 - * @new_dentry:       destination
 - * @delegated_inode: returns an inode needing a delegation break
 - *
 - * The caller must hold multiple mutexes--see lock_rename()).
 - *
 - * If vfs_rename discovers a delegation in need of breaking at either
 - * the source or destination, it will return -EWOULDBLOCK and return a
 - * reference to the inode in delegated_inode.  The caller should then
 - * break the delegation and retry.  Because breaking a delegation may
 - * take a long time, the caller should drop all locks before doing
 - * so.
 - *
 - * Alternatively, a caller may pass NULL for delegated_inode.  This may
 - * be appropriate for callers that expect the underlying filesystem not
 - * to be NFS exported.
 - */
 -int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 -             struct inode *new_dir, struct dentry *new_dentry,
 -             struct inode **delegated_inode)
 -{
 -      int error;
 -      int is_dir = d_is_directory(old_dentry) || d_is_autodir(old_dentry);
 -      const unsigned char *old_name;
 -
 -      if (old_dentry->d_inode == new_dentry->d_inode)
 -              return 0;
 - 
 -      error = may_delete(old_dir, old_dentry, is_dir);
 -      if (error)
 -              return error;
 -
 -      if (!new_dentry->d_inode)
 -              error = may_create(new_dir, new_dentry);
 -      else
 -              error = may_delete(new_dir, new_dentry, is_dir);
 -      if (error)
 -              return error;
 -
 -      if (!old_dir->i_op->rename)
 -              return -EPERM;
 -
 -      old_name = fsnotify_oldname_init(old_dentry->d_name.name);
 -
 -      if (is_dir)
 -              error = vfs_rename_dir(old_dir,old_dentry,new_dir,new_dentry);
 -      else
 -              error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry,delegated_inode);
 -      if (!error)
 +      if (!error) {
                fsnotify_move(old_dir, new_dir, old_name, is_dir,
 -                            new_dentry->d_inode, old_dentry);
 +                            !(flags & RENAME_EXCHANGE) ? target : NULL, old_dentry);
 +              if (flags & RENAME_EXCHANGE) {
 +                      fsnotify_move(new_dir, old_dir, old_dentry->d_name.name,
 +                                    new_is_dir, NULL, new_dentry);
 +              }
 +      }
        fsnotify_oldname_free(old_name);
  
        return error;
  }
  
 -SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
 -              int, newdfd, const char __user *, newname)
 +SYSCALL_DEFINE5(renameat2, int, olddfd, const char __user *, oldname,
 +              int, newdfd, const char __user *, newname, unsigned int, flags)
  {
        struct dentry *old_dir, *new_dir;
        struct dentry *old_dentry, *new_dentry;
        unsigned int lookup_flags = 0;
        bool should_retry = false;
        int error;
 +
 +      if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE))
 +              return -EINVAL;
 +
 +      if ((flags & RENAME_NOREPLACE) && (flags & RENAME_EXCHANGE))
 +              return -EINVAL;
 +
  retry:
        from = user_path_parent(olddfd, oldname, &oldnd, lookup_flags);
        if (IS_ERR(from)) {
                goto exit2;
  
        new_dir = newnd.path.dentry;
 +      if (flags & RENAME_NOREPLACE)
 +              error = -EEXIST;
        if (newnd.last_type != LAST_NORM)
                goto exit2;
  
  
        oldnd.flags &= ~LOOKUP_PARENT;
        newnd.flags &= ~LOOKUP_PARENT;
 -      newnd.flags |= LOOKUP_RENAME_TARGET;
 +      if (!(flags & RENAME_EXCHANGE))
 +              newnd.flags |= LOOKUP_RENAME_TARGET;
  
  retry_deleg:
        trap = lock_rename(new_dir, old_dir);
        error = -ENOENT;
        if (d_is_negative(old_dentry))
                goto exit4;
 +      new_dentry = lookup_hash(&newnd);
 +      error = PTR_ERR(new_dentry);
 +      if (IS_ERR(new_dentry))
 +              goto exit4;
 +      error = -EEXIST;
 +      if ((flags & RENAME_NOREPLACE) && d_is_positive(new_dentry))
 +              goto exit5;
 +      if (flags & RENAME_EXCHANGE) {
 +              error = -ENOENT;
 +              if (d_is_negative(new_dentry))
 +                      goto exit5;
 +
 +              if (!d_is_dir(new_dentry)) {
 +                      error = -ENOTDIR;
 +                      if (newnd.last.name[newnd.last.len])
 +                              goto exit5;
 +              }
 +      }
        /* unless the source is a directory trailing slashes give -ENOTDIR */
 -      if (!d_is_directory(old_dentry) && !d_is_autodir(old_dentry)) {
 +      if (!d_is_dir(old_dentry)) {
                error = -ENOTDIR;
                if (oldnd.last.name[oldnd.last.len])
 -                      goto exit4;
 -              if (newnd.last.name[newnd.last.len])
 -                      goto exit4;
 +                      goto exit5;
 +              if (!(flags & RENAME_EXCHANGE) && newnd.last.name[newnd.last.len])
 +                      goto exit5;
        }
        /* source should not be ancestor of target */
        error = -EINVAL;
        if (old_dentry == trap)
 -              goto exit4;
 -      new_dentry = lookup_hash(&newnd);
 -      error = PTR_ERR(new_dentry);
 -      if (IS_ERR(new_dentry))
 -              goto exit4;
 +              goto exit5;
        /* target should not be an ancestor of source */
 -      error = -ENOTEMPTY;
 +      if (!(flags & RENAME_EXCHANGE))
 +              error = -ENOTEMPTY;
        if (new_dentry == trap)
                goto exit5;
  
        error = security_path_rename(&oldnd.path, old_dentry,
 -                                   &newnd.path, new_dentry);
 +                                   &newnd.path, new_dentry, flags);
        if (error)
                goto exit5;
        error = vfs_rename(old_dir->d_inode, old_dentry,
 -                                 new_dir->d_inode, new_dentry,
 -                                 &delegated_inode);
 +                         new_dir->d_inode, new_dentry,
 +                         &delegated_inode, flags);
  exit5:
        dput(new_dentry);
  exit4:
@@@ -4293,15 -4245,9 +4293,15 @@@ exit
        return error;
  }
  
 +SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname,
 +              int, newdfd, const char __user *, newname)
 +{
 +      return sys_renameat2(olddfd, oldname, newdfd, newname, 0);
 +}
 +
  SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname)
  {
 -      return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname);
 +      return sys_renameat2(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
  }
  
  int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen, const char *link)
diff --combined include/linux/fs.h
@@@ -123,9 -123,6 +123,9 @@@ typedef void (dio_iodone_t)(struct kioc
  /* File is opened with O_PATH; almost nothing can be done with it */
  #define FMODE_PATH            ((__force fmode_t)0x4000)
  
 +/* File needs atomic accesses to f_pos */
 +#define FMODE_ATOMIC_POS      ((__force fmode_t)0x8000)
 +
  /* File was opened by fanotify and shouldn't generate fanotify events */
  #define FMODE_NONOTIFY                ((__force fmode_t)0x1000000)
  
@@@ -419,7 -416,6 +419,7 @@@ struct address_space 
        struct mutex            i_mmap_mutex;   /* protect tree, count, list */
        /* Protected by tree_lock together with the radix tree */
        unsigned long           nrpages;        /* number of total pages */
 +      unsigned long           nrshadows;      /* number of shadow entries */
        pgoff_t                 writeback_index;/* writeback starts here */
        const struct address_space_operations *a_ops;   /* methods */
        unsigned long           flags;          /* error bits/gfp mask */
@@@ -590,9 -586,6 +590,9 @@@ struct inode 
        atomic_t                i_count;
        atomic_t                i_dio_count;
        atomic_t                i_writecount;
 +#ifdef CONFIG_IMA
 +      atomic_t                i_readcount; /* struct files open RO */
 +#endif
        const struct file_operations    *i_fop; /* former ->i_op->default_file_ops */
        struct file_lock        *i_flock;
        struct address_space    i_data;
        struct hlist_head       i_fsnotify_marks;
  #endif
  
 -#ifdef CONFIG_IMA
 -      atomic_t                i_readcount; /* struct files open RO */
 -#endif
        void                    *i_private; /* fs or device private pointer */
  };
  
@@@ -784,14 -780,13 +784,14 @@@ struct file 
        const struct file_operations    *f_op;
  
        /*
 -       * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR.
 +       * Protects f_ep_links, f_flags.
         * Must not be taken from IRQ context.
         */
        spinlock_t              f_lock;
        atomic_long_t           f_count;
        unsigned int            f_flags;
        fmode_t                 f_mode;
 +      struct mutex            f_pos_lock;
        loff_t                  f_pos;
        struct fown_struct      f_owner;
        const struct cred       *f_cred;
  #ifdef CONFIG_DEBUG_WRITECOUNT
        unsigned long f_mnt_write_state;
  #endif
 -};
 +} __attribute__((aligned(4)));        /* lest something weird decides that 2 is OK */
  
  struct file_handle {
        __u32 handle_bytes;
@@@ -893,6 -888,7 +893,7 @@@ static inline int file_check_writeable(
  #define FL_SLEEP      128     /* A blocking lock */
  #define FL_DOWNGRADE_PENDING  256 /* Lease is being downgraded */
  #define FL_UNLOCK_PENDING     512 /* Lease is being broken */
+ #define FL_FILE_PVT   1024    /* lock is private to the file */
  
  /*
   * Special return value from posix_lock_file() and vfs_lock_file() for
@@@ -997,12 -993,12 +998,12 @@@ struct file_lock 
  extern void send_sigio(struct fown_struct *fown, int fd, int band);
  
  #ifdef CONFIG_FILE_LOCKING
- extern int fcntl_getlk(struct file *, struct flock __user *);
+ extern int fcntl_getlk(struct file *, unsigned int, struct flock __user *);
  extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
                        struct flock __user *);
  
  #if BITS_PER_LONG == 32
- extern int fcntl_getlk64(struct file *, struct flock64 __user *);
+ extern int fcntl_getlk64(struct file *, unsigned int, struct flock64 __user *);
  extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
                        struct flock64 __user *);
  #endif
@@@ -1017,7 -1013,7 +1018,7 @@@ extern struct file_lock * locks_alloc_l
  extern void locks_copy_lock(struct file_lock *, struct file_lock *);
  extern void __locks_copy_lock(struct file_lock *, const struct file_lock *);
  extern void locks_remove_posix(struct file *, fl_owner_t);
- extern void locks_remove_flock(struct file *);
+ extern void locks_remove_file(struct file *);
  extern void locks_release_private(struct file_lock *);
  extern void posix_test_lock(struct file *, struct file_lock *);
  extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *);
@@@ -1035,7 -1031,8 +1036,8 @@@ extern int lease_modify(struct file_loc
  extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
  extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
  #else /* !CONFIG_FILE_LOCKING */
- static inline int fcntl_getlk(struct file *file, struct flock __user *user)
+ static inline int fcntl_getlk(struct file *file, unsigned int cmd,
+                             struct flock __user *user)
  {
        return -EINVAL;
  }
@@@ -1047,7 -1044,8 +1049,8 @@@ static inline int fcntl_setlk(unsigned 
  }
  
  #if BITS_PER_LONG == 32
- static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user)
+ static inline int fcntl_getlk64(struct file *file, unsigned int cmd,
+                               struct flock64 __user *user)
  {
        return -EINVAL;
  }
@@@ -1088,7 -1086,7 +1091,7 @@@ static inline void locks_remove_posix(s
        return;
  }
  
- static inline void locks_remove_flock(struct file *filp)
+ static inline void locks_remove_file(struct file *filp)
  {
        return;
  }
@@@ -1461,7 -1459,7 +1464,7 @@@ extern int vfs_symlink(struct inode *, 
  extern int vfs_link(struct dentry *, struct inode *, struct dentry *, struct inode **);
  extern int vfs_rmdir(struct inode *, struct dentry *);
  extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
 -extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **);
 +extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int);
  
  /*
   * VFS dentry helper functions.
@@@ -1572,8 -1570,6 +1575,8 @@@ struct inode_operations 
        int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
        int (*rename) (struct inode *, struct dentry *,
                        struct inode *, struct dentry *);
 +      int (*rename2) (struct inode *, struct dentry *,
 +                      struct inode *, struct dentry *, unsigned int);
        int (*setattr) (struct dentry *, struct iattr *);
        int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
        int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@@ -1916,6 -1912,11 +1919,11 @@@ extern int current_umask(void)
  extern void ihold(struct inode * inode);
  extern void iput(struct inode *);
  
+ static inline struct inode *file_inode(struct file *f)
+ {
+       return f->f_inode;
+ }
  /* /sys/fs */
  extern struct kobject *fs_kobj;
  
  #define FLOCK_VERIFY_WRITE 2
  
  #ifdef CONFIG_FILE_LOCKING
- extern int locks_mandatory_locked(struct inode *);
+ extern int locks_mandatory_locked(struct file *);
  extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
  
  /*
@@@ -1948,10 -1949,10 +1956,10 @@@ static inline int mandatory_lock(struc
        return IS_MANDLOCK(ino) && __mandatory_lock(ino);
  }
  
- static inline int locks_verify_locked(struct inode *inode)
+ static inline int locks_verify_locked(struct file *file)
  {
-       if (mandatory_lock(inode))
-               return locks_mandatory_locked(inode);
+       if (mandatory_lock(file_inode(file)))
+               return locks_mandatory_locked(file);
        return 0;
  }
  
@@@ -1971,6 -1972,12 +1979,12 @@@ static inline int locks_verify_truncate
  
  static inline int break_lease(struct inode *inode, unsigned int mode)
  {
+       /*
+        * Since this check is lockless, we must ensure that any refcounts
+        * taken are done before checking inode->i_flock. Otherwise, we could
+        * end up racing with tasks trying to set a new lease on this file.
+        */
+       smp_mb();
        if (inode->i_flock)
                return __break_lease(inode, mode, FL_LEASE);
        return 0;
@@@ -2006,7 -2013,7 +2020,7 @@@ static inline int break_deleg_wait(stru
  }
  
  #else /* !CONFIG_FILE_LOCKING */
- static inline int locks_mandatory_locked(struct inode *inode)
+ static inline int locks_mandatory_locked(struct file *file)
  {
        return 0;
  }
@@@ -2028,7 -2035,7 +2042,7 @@@ static inline int mandatory_lock(struc
        return 0;
  }
  
- static inline int locks_verify_locked(struct inode *inode)
+ static inline int locks_verify_locked(struct file *file)
  {
        return 0;
  }
@@@ -2086,7 -2093,6 +2100,7 @@@ extern struct file * dentry_open(const 
  extern int filp_close(struct file *, fl_owner_t id);
  
  extern struct filename *getname(const char __user *);
 +extern struct filename *getname_kernel(const char *);
  
  enum {
        FILE_CREATED = 1,
@@@ -2281,13 -2287,7 +2295,13 @@@ extern int filemap_fdatawrite_range(str
  extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
                           int datasync);
  extern int vfs_fsync(struct file *file, int datasync);
 -extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
 +static inline int generic_write_sync(struct file *file, loff_t pos, loff_t count)
 +{
 +      if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host))
 +              return 0;
 +      return vfs_fsync_range(file, pos, pos + count - 1,
 +                             (file->f_flags & __O_SYNC) ? 0 : 1);
 +}
  extern void emergency_sync(void);
  extern void emergency_remount(void);
  #ifdef CONFIG_BLOCK
@@@ -2302,11 -2302,6 +2316,6 @@@ static inline bool execute_ok(struct in
        return (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode);
  }
  
- static inline struct inode *file_inode(struct file *f)
- {
-       return f->f_inode;
- }
  static inline void file_start_write(struct file *file)
  {
        if (!S_ISREG(file_inode(file)->i_mode))
diff --combined mm/mmap.c
+++ b/mm/mmap.c
@@@ -405,7 -405,7 +405,7 @@@ static void validate_mm_rb(struct rb_ro
        }
  }
  
 -void validate_mm(struct mm_struct *mm)
 +static void validate_mm(struct mm_struct *mm)
  {
        int bug = 0;
        int i = 0;
@@@ -1299,7 -1299,7 +1299,7 @@@ unsigned long do_mmap_pgoff(struct fil
                        /*
                         * Make sure there are no mandatory locks on the file.
                         */
-                       if (locks_verify_locked(inode))
+                       if (locks_verify_locked(file))
                                return -EAGAIN;
  
                        vm_flags |= VM_SHARED | VM_MAYSHARE;
@@@ -2918,7 -2918,7 +2918,7 @@@ static const struct vm_operations_struc
   * The array pointer and the pages it points to are assumed to stay alive
   * for as long as this mapping might exist.
   */
 -int install_special_mapping(struct mm_struct *mm,
 +struct vm_area_struct *_install_special_mapping(struct mm_struct *mm,
                            unsigned long addr, unsigned long len,
                            unsigned long vm_flags, struct page **pages)
  {
  
        vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (unlikely(vma == NULL))
 -              return -ENOMEM;
 +              return ERR_PTR(-ENOMEM);
  
        INIT_LIST_HEAD(&vma->anon_vma_chain);
        vma->vm_mm = mm;
  
        perf_event_mmap(vma);
  
 -      return 0;
 +      return vma;
  
  out:
        kmem_cache_free(vm_area_cachep, vma);
 -      return ret;
 +      return ERR_PTR(ret);
 +}
 +
 +int install_special_mapping(struct mm_struct *mm,
 +                          unsigned long addr, unsigned long len,
 +                          unsigned long vm_flags, struct page **pages)
 +{
 +      struct vm_area_struct *vma = _install_special_mapping(mm,
 +                          addr, len, vm_flags, pages);
 +
 +      if (IS_ERR(vma))
 +              return PTR_ERR(vma);
 +      return 0;
  }
  
  static DEFINE_MUTEX(mm_all_locks_mutex);
diff --combined security/selinux/hooks.c
@@@ -106,7 -106,7 +106,7 @@@ int selinux_enforcing
  static int __init enforcing_setup(char *str)
  {
        unsigned long enforcing;
 -      if (!strict_strtoul(str, 0, &enforcing))
 +      if (!kstrtoul(str, 0, &enforcing))
                selinux_enforcing = enforcing ? 1 : 0;
        return 1;
  }
@@@ -119,7 -119,7 +119,7 @@@ int selinux_enabled = CONFIG_SECURITY_S
  static int __init selinux_enabled_setup(char *str)
  {
        unsigned long enabled;
 -      if (!strict_strtoul(str, 0, &enabled))
 +      if (!kstrtoul(str, 0, &enabled))
                selinux_enabled = enabled ? 1 : 0;
        return 1;
  }
@@@ -668,7 -668,7 +668,7 @@@ static int selinux_set_mnt_opts(struct 
                if (flags[i] == SBLABEL_MNT)
                        continue;
                rc = security_context_to_sid(mount_options[i],
 -                                           strlen(mount_options[i]), &sid);
 +                                           strlen(mount_options[i]), &sid, GFP_KERNEL);
                if (rc) {
                        printk(KERN_WARNING "SELinux: security_context_to_sid"
                               "(%s) failed for (dev %s, type %s) errno=%d\n",
@@@ -1418,33 -1418,15 +1418,33 @@@ static int inode_doinit_with_dentry(str
                isec->sid = sbsec->sid;
  
                if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) {
 -                      if (opt_dentry) {
 -                              isec->sclass = inode_mode_to_security_class(inode->i_mode);
 -                              rc = selinux_proc_get_sid(opt_dentry,
 -                                                        isec->sclass,
 -                                                        &sid);
 -                              if (rc)
 -                                      goto out_unlock;
 -                              isec->sid = sid;
 -                      }
 +                      /* We must have a dentry to determine the label on
 +                       * procfs inodes */
 +                      if (opt_dentry)
 +                              /* Called from d_instantiate or
 +                               * d_splice_alias. */
 +                              dentry = dget(opt_dentry);
 +                      else
 +                              /* Called from selinux_complete_init, try to
 +                               * find a dentry. */
 +                              dentry = d_find_alias(inode);
 +                      /*
 +                       * This can be hit on boot when a file is accessed
 +                       * before the policy is loaded.  When we load policy we
 +                       * may find inodes that have no dentry on the
 +                       * sbsec->isec_head list.  No reason to complain as
 +                       * these will get fixed up the next time we go through
 +                       * inode_doinit() with a dentry, before these inodes
 +                       * could be used again by userspace.
 +                       */
 +                      if (!dentry)
 +                              goto out_unlock;
 +                      isec->sclass = inode_mode_to_security_class(inode->i_mode);
 +                      rc = selinux_proc_get_sid(dentry, isec->sclass, &sid);
 +                      dput(dentry);
 +                      if (rc)
 +                              goto out_unlock;
 +                      isec->sid = sid;
                }
                break;
        }
@@@ -2507,8 -2489,7 +2507,8 @@@ static int selinux_sb_remount(struct su
                if (flags[i] == SBLABEL_MNT)
                        continue;
                len = strlen(mount_options[i]);
 -              rc = security_context_to_sid(mount_options[i], len, &sid);
 +              rc = security_context_to_sid(mount_options[i], len, &sid,
 +                                           GFP_KERNEL);
                if (rc) {
                        printk(KERN_WARNING "SELinux: security_context_to_sid"
                               "(%s) failed for (dev %s, type %s) errno=%d\n",
@@@ -2912,7 -2893,7 +2912,7 @@@ static int selinux_inode_setxattr(struc
        if (rc)
                return rc;
  
 -      rc = security_context_to_sid(value, size, &newsid);
 +      rc = security_context_to_sid(value, size, &newsid, GFP_KERNEL);
        if (rc == -EINVAL) {
                if (!capable(CAP_MAC_ADMIN)) {
                        struct audit_buffer *ab;
@@@ -3069,7 -3050,7 +3069,7 @@@ static int selinux_inode_setsecurity(st
        if (!value || !size)
                return -EACCES;
  
 -      rc = security_context_to_sid((void *)value, size, &newsid);
 +      rc = security_context_to_sid((void *)value, size, &newsid, GFP_KERNEL);
        if (rc)
                return rc;
  
@@@ -3223,20 -3204,24 +3223,20 @@@ error
  
  static int selinux_mmap_addr(unsigned long addr)
  {
 -      int rc = 0;
 -      u32 sid = current_sid();
 +      int rc;
 +
 +      /* do DAC check on address space usage */
 +      rc = cap_mmap_addr(addr);
 +      if (rc)
 +              return rc;
  
 -      /*
 -       * notice that we are intentionally putting the SELinux check before
 -       * the secondary cap_file_mmap check.  This is such a likely attempt
 -       * at bad behaviour/exploit that we always want to get the AVC, even
 -       * if DAC would have also denied the operation.
 -       */
        if (addr < CONFIG_LSM_MMAP_MIN_ADDR) {
 +              u32 sid = current_sid();
                rc = avc_has_perm(sid, sid, SECCLASS_MEMPROTECT,
                                  MEMPROTECT__MMAP_ZERO, NULL);
 -              if (rc)
 -                      return rc;
        }
  
 -      /* do DAC check on address space usage */
 -      return cap_mmap_addr(addr);
 +      return rc;
  }
  
  static int selinux_mmap_file(struct file *file, unsigned long reqprot,
@@@ -3317,6 -3302,9 +3317,9 @@@ static int selinux_file_fcntl(struct fi
        case F_GETLK:
        case F_SETLK:
        case F_SETLKW:
+       case F_GETLKP:
+       case F_SETLKP:
+       case F_SETLKPW:
  #if BITS_PER_LONG == 32
        case F_GETLK64:
        case F_SETLK64:
@@@ -5544,7 -5532,7 +5547,7 @@@ static int selinux_setprocattr(struct t
                        str[size-1] = 0;
                        size--;
                }
 -              error = security_context_to_sid(value, size, &sid);
 +              error = security_context_to_sid(value, size, &sid, GFP_KERNEL);
                if (error == -EINVAL && !strcmp(name, "fscreate")) {
                        if (!capable(CAP_MAC_ADMIN)) {
                                struct audit_buffer *ab;
@@@ -5653,7 -5641,7 +5656,7 @@@ static int selinux_secid_to_secctx(u32 
  
  static int selinux_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid)
  {
 -      return security_context_to_sid(secdata, seclen, secid);
 +      return security_context_to_sid(secdata, seclen, secid, GFP_KERNEL);
  }
  
  static void selinux_release_secctx(char *secdata, u32 seclen)