Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Jan 2011 19:28:34 +0000 (11:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Jan 2011 19:28:34 +0000 (11:28 -0800)
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (22 commits)
  MAINTAINERS: Update Joel Becker's email address
  ocfs2: Remove unused truncate function from alloc.c
  ocfs2/cluster: dereferencing before checking in nst_seq_show()
  ocfs2: fix build for OCFS2_FS_STATS not enabled
  ocfs2/cluster: Show o2net timing statistics
  ocfs2/cluster: Track process message timing stats for each socket
  ocfs2/cluster: Track send message timing stats for each socket
  ocfs2/cluster: Use ktime instead of timeval in struct o2net_sock_container
  ocfs2/cluster: Replace timeval with ktime in struct o2net_send_tracking
  ocfs2: Add DEBUG_FS dependency
  ocfs2/dlm: Hard code the values for enums
  ocfs2/dlm: Minor cleanup
  ocfs2/dlm: Cleanup dlmdebug.c
  ocfs2: Release buffer_head in case of error in ocfs2_double_lock.
  ocfs2/cluster: Pin the local node when o2hb thread starts
  ocfs2/cluster: Show pin state for each o2hb region
  ocfs2/cluster: Pin/unpin o2hb regions
  ocfs2/cluster: Remove dropped region from o2hb quorum region bitmap
  ocfs2/cluster: Pin the remote node item in configfs
  ocfs2/dlm: make existing convertion precedent over new lock
  ...

1  2 
MAINTAINERS
fs/ocfs2/aops.c
fs/ocfs2/cluster/heartbeat.c
fs/ocfs2/namei.c

diff --combined MAINTAINERS
@@@ -166,8 -166,9 +166,8 @@@ F: drivers/serial/8250
  F:    include/linux/serial_8250.h
  
  8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
 -M:    Paul Gortmaker <p_gortmaker@yahoo.com>
  L:    netdev@vger.kernel.org
 -S:    Maintained
 +S:    Orphan / Obsolete
  F:    drivers/net/*8390*
  F:    drivers/net/ax88796.c
  
@@@ -285,41 -286,6 +285,41 @@@ L:       linux-parisc@vger.kernel.or
  S:    Maintained
  F:    sound/pci/ad1889.*
  
 +AD525X ANALOG DEVICES DIGITAL POTENTIOMETERS DRIVER
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/AD5254
 +S:    Supported
 +F:    drivers/misc/ad525x_dpot.c
 +
 +AD5398 CURRENT REGULATOR DRIVER (AD5398/AD5821)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/AD5398
 +S:    Supported
 +F:    drivers/regulator/ad5398.c
 +
 +AD714X CAPACITANCE TOUCH SENSOR DRIVER (AD7142/3/7/8/7A)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/AD7142
 +S:    Supported
 +F:    drivers/input/misc/ad714x.c
 +
 +AD7877 TOUCHSCREEN DRIVER
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/AD7877
 +S:    Supported
 +F:    drivers/input/touchscreen/ad7877.c
 +
 +AD7879 TOUCHSCREEN DRIVER (AD7879/AD7889)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/AD7879
 +S:    Supported
 +F:    drivers/input/touchscreen/ad7879.c
 +
  ADM1025 HARDWARE MONITOR DRIVER
  M:    Jean Delvare <khali@linux-fr.org>
  L:    lm-sensors@lm-sensors.org
@@@ -339,32 -305,6 +339,32 @@@ W:       http://linuxwireless.org
  S:    Orphan
  F:    drivers/net/wireless/adm8211.*
  
 +ADP5520 BACKLIGHT DRIVER WITH IO EXPANDER (ADP5520/ADP5501)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/ADP5520
 +S:    Supported
 +F:    drivers/mfd/adp5520.c
 +F:    drivers/video/backlight/adp5520_bl.c
 +F:    drivers/led/leds-adp5520.c
 +F:    drivers/gpio/adp5520-gpio.c
 +F:    drivers/input/keyboard/adp5520-keys.c
 +
 +ADP5588 QWERTY KEYPAD AND IO EXPANDER DRIVER (ADP5588/ADP5587)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/ADP5588
 +S:    Supported
 +F:    drivers/input/keyboard/adp5588-keys.c
 +F:    drivers/gpio/adp5588-gpio.c
 +
 +ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/ADP8860
 +S:    Supported
 +F:    drivers/video/backlight/adp8860_bl.c
 +
  ADT746X FAN DRIVER
  M:    Colin Leroy <colin@colino.net>
  S:    Maintained
@@@ -377,13 -317,6 +377,13 @@@ S:       Maintaine
  F:    Documentation/hwmon/adt7475
  F:    drivers/hwmon/adt7475.c
  
 +ADXL34X THREE-AXIS DIGITAL ACCELEROMETER DRIVER (ADXL345/ADXL346)
 +M:    Michael Hennerich <michael.hennerich@analog.com>
 +L:    device-driver-devel@blackfin.uclinux.org
 +W:    http://wiki-analog.com/ADXL345
 +S:    Supported
 +F:    drivers/input/misc/adxl34x.c
 +
  ADVANSYS SCSI DRIVER
  M:    Matthew Wilcox <matthew@wil.cx>
  L:    linux-scsi@vger.kernel.org
@@@ -472,7 -405,7 +472,7 @@@ S: Supporte
  F:    drivers/usb/gadget/amd5536udc.*
  
  AMD GEODE PROCESSOR/CHIPSET SUPPORT
 -P:    Jordan Crouse
 +P:    Andres Salomon <dilinger@queued.net>
  L:    linux-geode@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
  S:    Supported
@@@ -508,23 -441,17 +508,23 @@@ L:      linux-rdma@vger.kernel.or
  S:    Maintained
  F:    drivers/infiniband/hw/amso1100/
  
 -ANALOG DEVICES INC ASOC DRIVERS
 -L:    uclinux-dist-devel@blackfin.uclinux.org
 +ANALOG DEVICES INC ASOC CODEC DRIVERS
 +L:    device-driver-devel@blackfin.uclinux.org
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 -W:    http://blackfin.uclinux.org/
 +W:    http://wiki-analog.com/
  S:    Supported
 -F:    sound/soc/blackfin/*
  F:    sound/soc/codecs/ad1*
  F:    sound/soc/codecs/adau*
  F:    sound/soc/codecs/adav*
  F:    sound/soc/codecs/ssm*
  
 +ANALOG DEVICES INC ASOC DRIVERS
 +L:    uclinux-dist-devel@blackfin.uclinux.org
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +W:    http://blackfin.uclinux.org/
 +S:    Supported
 +F:    sound/soc/blackfin/*
 +
  AOA (Apple Onboard Audio) ALSA DRIVER
  M:    Johannes Berg <johannes@sipsolutions.net>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -865,14 -792,11 +865,14 @@@ S:      Maintaine
  
  ARM/NOMADIK ARCHITECTURE
  M:    Alessandro Rubini <rubini@unipv.it>
 +M:    Linus Walleij <linus.walleij@stericsson.com>
  M:    STEricsson <STEricsson_nomadik_linux@list.st.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-nomadik/
  F:    arch/arm/plat-nomadik/
 +F:    drivers/i2c/busses/i2c-nomadik.c
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
  
  ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
  M:    Nelson Castillo <arhuaco@freaks-unidos.net>
@@@ -1074,24 -998,12 +1074,24 @@@ F:    drivers/i2c/busses/i2c-stu300.
  F:    drivers/rtc/rtc-coh901331.c
  F:    drivers/watchdog/coh901327_wdt.c
  F:    drivers/dma/coh901318*
 +F:    drivers/mfd/ab3100*
 +F:    drivers/rtc/rtc-ab3100.c
 +F:    drivers/rtc/rtc-coh901331.c
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
  
 -ARM/U8500 ARM ARCHITECTURE
 +ARM/Ux500 ARM ARCHITECTURE
  M:    Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
 +M:    Linus Walleij <linus.walleij@stericsson.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-ux500/
 +F:    drivers/dma/ste_dma40*
 +F:    drivers/mfd/ab3550*
 +F:    drivers/mfd/abx500*
 +F:    drivers/mfd/ab8500*
 +F:    drivers/mfd/stmpe*
 +F:    drivers/rtc/rtc-ab8500.c
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
  
  ARM/VFP SUPPORT
  M:    Russell King <linux@arm.linux.org.uk>
@@@ -1168,12 -1080,6 +1168,12 @@@ S:    Supporte
  F:    Documentation/aoe/
  F:    drivers/block/aoe/
  
 +ATHEROS ATH GENERIC UTILITIES
 +M:    "Luis R. Rodriguez" <lrodriguez@atheros.com>
 +L:    linux-wireless@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/wireless/ath/*
 +
  ATHEROS ATH5K WIRELESS DRIVER
  M:    Jiri Slaby <jirislaby@gmail.com>
  M:    Nick Kossifidis <mickflemm@gmail.com>
@@@ -1352,15 -1258,6 +1352,15 @@@ S:    Maintaine
  F:    drivers/video/backlight/
  F:    include/linux/backlight.h
  
 +BATMAN ADVANCED
 +M:    Marek Lindner <lindner_marek@yahoo.de>
 +M:    Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
 +M:    Sven Eckelmann <sven@narfation.org>
 +L:    b.a.t.m.a.n@lists.open-mesh.org
 +W:    http://www.open-mesh.org/
 +S:    Maintained
 +F:    net/batman-adv/
 +
  BAYCOM/HDLCDRV DRIVERS FOR AX.25
  M:    Thomas Sailer <t.sailer@alumni.ethz.ch>
  L:    linux-hams@vger.kernel.org
@@@ -1497,9 -1394,7 +1497,9 @@@ F:      drivers/net/tg3.
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
  M:    Brett Rudley <brudley@broadcom.com>
  M:    Henry Ptasinski <henryp@broadcom.com>
 -M:    Nohee Ko <noheek@broadcom.com>
 +M:    Dowan Kim <dowan@broadcom.com>
 +M:    Roland Vossen <rvossen@broadcom.com>
 +M:    Arend van Spriel <arend@broadcom.com>
  L:    linux-wireless@vger.kernel.org
  S:    Supported
  F:    drivers/staging/brcm80211/
@@@ -1785,7 -1680,8 +1785,8 @@@ S:      Maintaine
  F:    drivers/usb/atm/cxacru.c
  
  CONFIGFS
- M:    Joel Becker <joel.becker@oracle.com>
+ M:    Joel Becker <jlbec@evilplan.org>
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/configfs.git
  S:    Supported
  F:    fs/configfs/
  F:    include/linux/configfs.h
@@@ -2347,14 -2243,6 +2348,14 @@@ W:    http://acpi4asus.sf.ne
  S:    Maintained
  F:    drivers/platform/x86/eeepc-laptop.c
  
 +EEEPC WMI EXTRAS DRIVER
 +M:    Corentin Chary <corentincj@iksaif.net>
 +L:    acpi4asus-user@lists.sourceforge.net
 +L:    platform-driver-x86@vger.kernel.org
 +W:    http://acpi4asus.sf.net
 +S:    Maintained
 +F:    drivers/platform/x86/eeepc-wmi.c
 +
  EFIFB FRAMEBUFFER DRIVER
  L:    linux-fbdev@vger.kernel.org
  M:    Peter Jones <pjones@redhat.com>
@@@ -2692,14 -2580,6 +2693,14 @@@ S:    Supporte
  F:    drivers/i2c/busses/i2c-gpio.c
  F:    include/linux/i2c-gpio.h
  
 +GENERIC GPIO I2C MULTIPLEXER DRIVER
 +M:    Peter Korsgaard <peter.korsgaard@barco.com>
 +L:    linux-i2c@vger.kernel.org
 +S:    Supported
 +F:    drivers/i2c/muxes/gpio-i2cmux.c
 +F:    include/linux/gpio-i2cmux.h
 +F:    Documentation/i2c/muxes/gpio-i2cmux
 +
  GENERIC HDLC (WAN) DRIVERS
  M:    Krzysztof Halasa <khc@pm.waw.pl>
  W:    http://www.kernel.org/pub/linux/utils/net/hdlc/
@@@ -2918,10 -2798,6 +2919,10 @@@ M:    Thomas Gleixner <tglx@linutronix.de
  S:    Maintained
  F:    Documentation/timers/
  F:    kernel/hrtimer.c
 +F:    kernel/time/clockevents.c
 +F:    kernel/time/tick*.*
 +F:    kernel/time/timer_*.c
 +F     include/linux/clockevents.h
  F:    include/linux/hrtimer.h
  
  HIGH-SPEED SCC DRIVER FOR AX.25
@@@ -3157,10 -3033,8 +3158,10 @@@ F:    drivers/input
  INPUT MULTITOUCH (MT) PROTOCOL
  M:    Henrik Rydberg <rydberg@euromail.se>
  L:    linux-input@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rydberg/input-mt.git
  S:    Maintained
  F:    Documentation/input/multi-touch-protocol.txt
 +F:    drivers/input/input-mt.c
  K:    \b(ABS|SYN)_MT_
  
  INTEL IDLE DRIVER
@@@ -3247,8 -3121,6 +3248,8 @@@ M:      Alex Duyck <alexander.h.duyck@intel.
  M:    John Ronciak <john.ronciak@intel.com>
  L:    e1000-devel@lists.sourceforge.net
  W:    http://e1000.sourceforge.net/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next-2.6.git
  S:    Supported
  F:    Documentation/networking/e100.txt
  F:    Documentation/networking/e1000.txt
@@@ -4360,7 -4232,6 +4361,7 @@@ NILFS2 FILESYSTE
  M:    KONISHI Ryusuke <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
  S:    Supported
  F:    Documentation/filesystems/nilfs2.txt
  F:    fs/nilfs2/
@@@ -4458,20 -4329,6 +4459,20 @@@ M:    Deepak Saxena <dsaxena@plexity.net
  S:    Maintained
  F:    drivers/char/hw_random/omap-rng.c
  
 +OMAP HWMOD SUPPORT
 +M:    Benoît Cousson <b-cousson@ti.com>
 +M:    Paul Walmsley <paul@pwsan.com>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    arch/arm/mach-omap2/omap_hwmod.c
 +F:    arch/arm/plat-omap/include/plat/omap_hwmod.h
 +
 +OMAP HWMOD DATA FOR OMAP4-BASED DEVICES
 +M:    Benoît Cousson <b-cousson@ti.com>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    arch/arm/mach-omap2/omap_hwmod_44xx_data.c
 +
  OMAP USB SUPPORT
  M:    Felipe Balbi <balbi@ti.com>
  M:    David Brownell <dbrownell@users.sourceforge.net>
@@@ -4549,7 -4406,7 +4550,7 @@@ F:      include/linux/oprofile.
  
  ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
  M:    Mark Fasheh <mfasheh@suse.com>
- M:    Joel Becker <joel.becker@oracle.com>
+ M:    Joel Becker <jlbec@evilplan.org>
  L:    ocfs2-devel@oss.oracle.com (moderated for non-subscribers)
  W:    http://oss.oracle.com/projects/ocfs2/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git
@@@ -4734,7 -4591,7 +4735,7 @@@ F:      drivers/pcmcia
  F:    include/pcmcia/
  
  PCNET32 NETWORK DRIVER
 -M:    Don Fry <pcnet32@verizon.net>
 +M:    Don Fry <pcnet32@frontier.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/pcnet32.c
@@@ -4746,16 -4603,6 +4747,16 @@@ S:    Maintaine
  F:    crypto/pcrypt.c
  F:    include/crypto/pcrypt.h
  
 +PER-CPU MEMORY ALLOCATOR
 +M:    Tejun Heo <tj@kernel.org>
 +M:    Christoph Lameter <cl@linux-foundation.org>
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git
 +S:    Maintained
 +F:    include/linux/percpu*.h
 +F:    mm/percpu*.c
 +F:    arch/*/include/asm/percpu.h
 +
  PER-TASK DELAY ACCOUNTING
  M:    Balbir Singh <balbir@linux.vnet.ibm.com>
  S:    Maintained
@@@ -4766,7 -4613,7 +4767,7 @@@ PERFORMANCE EVENTS SUBSYSTE
  M:    Peter Zijlstra <a.p.zijlstra@chello.nl>
  M:    Paul Mackerras <paulus@samba.org>
  M:    Ingo Molnar <mingo@elte.hu>
 -M:    Arnaldo Carvalho de Melo <acme@redhat.com>
 +M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
  S:    Supported
  F:    kernel/perf_event*.c
  F:    include/linux/perf_event.h
@@@ -5191,7 -5038,7 +5192,7 @@@ L:      linux-wireless@vger.kernel.or
  W:    http://linuxwireless.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
  S:    Maintained
 -F:    drivers/net/wireless/rtl818x/rtl8180*
 +F:    drivers/net/wireless/rtl818x/rtl8180/
  
  RTL8187 WIRELESS DRIVER
  M:    Herton Ronaldo Krzesinski <herton@mandriva.com.br>
@@@ -5201,17 -5048,7 +5202,17 @@@ L:    linux-wireless@vger.kernel.or
  W:    http://linuxwireless.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
  S:    Maintained
 -F:    drivers/net/wireless/rtl818x/rtl8187*
 +F:    drivers/net/wireless/rtl818x/rtl8187/
 +
 +RTL8192CE WIRELESS DRIVER
 +M:    Larry Finger <Larry.Finger@lwfinger.net>
 +M:    Chaoming Li <chaoming_li@realsil.com.cn>
 +L:    linux-wireless@vger.kernel.org
 +W:    http://linuxwireless.org/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
 +S:    Maintained
 +F:    drivers/net/wireless/rtlwifi/
 +F:    drivers/net/wireless/rtlwifi/rtl8192ce/
  
  S3 SAVAGE FRAMEBUFFER DRIVER
  M:    Antonino Daplas <adaplas@gmail.com>
@@@ -5291,18 -5128,6 +5292,18 @@@ L:    alsa-devel@alsa-project.org (moderat
  S:    Supported
  F:    sound/soc/s3c24xx
  
 +TIMEKEEPING, NTP
 +M:    John Stultz <johnstul@us.ibm.com>
 +M:    Thomas Gleixner <tglx@linutronix.de>
 +S:    Supported
 +F:    include/linux/clocksource.h
 +F:    include/linux/time.h
 +F:    include/linux/timex.h
 +F:    include/linux/timekeeping.h
 +F:    kernel/time/clocksource.c
 +F:    kernel/time/time*.c
 +F:    kernel/time/ntp.c
 +
  TLG2300 VIDEO4LINUX-2 DRIVER
  M:    Huang Shijie <shijie8@gmail.com>
  M:    Kang Yong <kangyong@telegent.com>
@@@ -5873,6 -5698,12 +5874,6 @@@ M:     Ion Badulescu <ionut@badula.org
  S:    Odd Fixes
  F:    drivers/net/starfire*
  
 -STRADIS MPEG-2 DECODER DRIVER
 -M:    Nathan Laredo <laredo@gnu.org>
 -W:    http://www.stradis.com/
 -S:    Maintained
 -F:    drivers/media/video/stradis.c
 -
  SUN3/3X
  M:    Sam Creasey <sammy@sammy.net>
  W:    http://sammy.net/sun3/
@@@ -6022,8 -5853,7 +6023,8 @@@ F:      drivers/net/tlan.
  TOMOYO SECURITY MODULE
  M:    Kentaro Takeda <takedakn@nttdata.co.jp>
  M:    Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
 -L:    tomoyo-users-en@lists.sourceforge.jp (subscribers-only, for developers and users in English)
 +L:    tomoyo-dev-en@lists.sourceforge.jp (subscribers-only, for developers in English)
 +L:    tomoyo-users-en@lists.sourceforge.jp (subscribers-only, for users in English)
  L:    tomoyo-dev@lists.sourceforge.jp (subscribers-only, for developers in Japanese)
  L:    tomoyo-users@lists.sourceforge.jp (subscribers-only, for users in Japanese)
  W:    http://tomoyo.sourceforge.jp/
diff --combined fs/ocfs2/aops.c
@@@ -573,14 -573,11 +573,14 @@@ static void ocfs2_dio_end_io(struct kio
        /* this io's submitter should not have unlocked this before we could */
        BUG_ON(!ocfs2_iocb_is_rw_locked(iocb));
  
 +      if (ocfs2_iocb_is_sem_locked(iocb)) {
 +              up_read(&inode->i_alloc_sem);
 +              ocfs2_iocb_clear_sem_locked(iocb);
 +      }
 +
        ocfs2_iocb_clear_rw_locked(iocb);
  
        level = ocfs2_iocb_rw_locked_level(iocb);
 -      if (!level)
 -              up_read(&inode->i_alloc_sem);
        ocfs2_rw_unlock(inode, level);
  
        if (is_async)
@@@ -1630,6 -1627,43 +1630,43 @@@ static int ocfs2_zero_tail(struct inod
        return ret;
  }
  
+ /*
+  * Try to flush truncate logs if we can free enough clusters from it.
+  * As for return value, "< 0" means error, "0" no space and "1" means
+  * we have freed enough spaces and let the caller try to allocate again.
+  */
+ static int ocfs2_try_to_free_truncate_log(struct ocfs2_super *osb,
+                                         unsigned int needed)
+ {
+       tid_t target;
+       int ret = 0;
+       unsigned int truncated_clusters;
+       mutex_lock(&osb->osb_tl_inode->i_mutex);
+       truncated_clusters = osb->truncated_clusters;
+       mutex_unlock(&osb->osb_tl_inode->i_mutex);
+       /*
+        * Check whether we can succeed in allocating if we free
+        * the truncate log.
+        */
+       if (truncated_clusters < needed)
+               goto out;
+       ret = ocfs2_flush_truncate_log(osb);
+       if (ret) {
+               mlog_errno(ret);
+               goto out;
+       }
+       if (jbd2_journal_start_commit(osb->journal->j_journal, &target)) {
+               jbd2_log_wait_commit(osb->journal->j_journal, target);
+               ret = 1;
+       }
+ out:
+       return ret;
+ }
  int ocfs2_write_begin_nolock(struct file *filp,
                             struct address_space *mapping,
                             loff_t pos, unsigned len, unsigned flags,
                             struct buffer_head *di_bh, struct page *mmap_page)
  {
        int ret, cluster_of_pages, credits = OCFS2_INODE_UPDATE_CREDITS;
-       unsigned int clusters_to_alloc, extents_to_split;
+       unsigned int clusters_to_alloc, extents_to_split, clusters_need = 0;
        struct ocfs2_write_ctxt *wc;
        struct inode *inode = mapping->host;
        struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
        struct ocfs2_alloc_context *meta_ac = NULL;
        handle_t *handle;
        struct ocfs2_extent_tree et;
+       int try_free = 1, ret1;
  
+ try_again:
        ret = ocfs2_alloc_write_ctxt(&wc, osb, pos, len, di_bh);
        if (ret) {
                mlog_errno(ret);
                mlog_errno(ret);
                goto out;
        } else if (ret == 1) {
+               clusters_need = wc->w_clen;
                ret = ocfs2_refcount_cow(inode, filp, di_bh,
                                         wc->w_cpos, wc->w_clen, UINT_MAX);
                if (ret) {
                mlog_errno(ret);
                goto out;
        }
+       clusters_need += clusters_to_alloc;
  
        di = (struct ocfs2_dinode *)wc->w_di_bh->b_data;
  
                ocfs2_free_alloc_context(data_ac);
        if (meta_ac)
                ocfs2_free_alloc_context(meta_ac);
+       if (ret == -ENOSPC && try_free) {
+               /*
+                * Try to free some truncate log so that we can have enough
+                * clusters to allocate.
+                */
+               try_free = 0;
+               ret1 = ocfs2_try_to_free_truncate_log(osb, clusters_need);
+               if (ret1 == 1)
+                       goto try_again;
+               if (ret1 < 0)
+                       mlog_errno(ret1);
+       }
        return ret;
  }
  
@@@ -82,6 -82,7 +82,7 @@@ static unsigned long o2hb_failed_region
  #define O2HB_DB_TYPE_REGION_LIVENODES 4
  #define O2HB_DB_TYPE_REGION_NUMBER    5
  #define O2HB_DB_TYPE_REGION_ELAPSED_TIME      6
+ #define O2HB_DB_TYPE_REGION_PINNED    7
  struct o2hb_debug_buf {
        int db_type;
        int db_size;
@@@ -101,6 -102,7 +102,7 @@@ static struct o2hb_debug_buf *o2hb_db_f
  #define O2HB_DEBUG_FAILEDREGIONS      "failed_regions"
  #define O2HB_DEBUG_REGION_NUMBER      "num"
  #define O2HB_DEBUG_REGION_ELAPSED_TIME        "elapsed_time_in_ms"
+ #define O2HB_DEBUG_REGION_PINNED      "pinned"
  
  static struct dentry *o2hb_debug_dir;
  static struct dentry *o2hb_debug_livenodes;
@@@ -132,6 -134,33 +134,33 @@@ char *o2hb_heartbeat_mode_desc[O2HB_HEA
  unsigned int o2hb_dead_threshold = O2HB_DEFAULT_DEAD_THRESHOLD;
  unsigned int o2hb_heartbeat_mode = O2HB_HEARTBEAT_LOCAL;
  
+ /*
+  * o2hb_dependent_users tracks the number of registered callbacks that depend
+  * on heartbeat. o2net and o2dlm are two entities that register this callback.
+  * However only o2dlm depends on the heartbeat. It does not want the heartbeat
+  * to stop while a dlm domain is still active.
+  */
+ unsigned int o2hb_dependent_users;
+ /*
+  * In global heartbeat mode, all regions are pinned if there are one or more
+  * dependent users and the quorum region count is <= O2HB_PIN_CUT_OFF. All
+  * regions are unpinned if the region count exceeds the cut off or the number
+  * of dependent users falls to zero.
+  */
+ #define O2HB_PIN_CUT_OFF              3
+ /*
+  * In local heartbeat mode, we assume the dlm domain name to be the same as
+  * region uuid. This is true for domains created for the file system but not
+  * necessarily true for userdlm domains. This is a known limitation.
+  *
+  * In global heartbeat mode, we pin/unpin all o2hb regions. This solution
+  * works for both file system and userdlm domains.
+  */
+ static int o2hb_region_pin(const char *region_uuid);
+ static void o2hb_region_unpin(const char *region_uuid);
  /* Only sets a new threshold if there are no active regions.
   *
   * No locking or otherwise interesting code is required for reading
@@@ -186,7 -215,9 +215,9 @@@ struct o2hb_region 
        struct config_item      hr_item;
  
        struct list_head        hr_all_item;
-       unsigned                hr_unclean_stop:1;
+       unsigned                hr_unclean_stop:1,
+                               hr_item_pinned:1,
+                               hr_item_dropped:1;
  
        /* protected by the hr_callback_sem */
        struct task_struct      *hr_task;
        struct dentry           *hr_debug_livenodes;
        struct dentry           *hr_debug_regnum;
        struct dentry           *hr_debug_elapsed_time;
+       struct dentry           *hr_debug_pinned;
        struct o2hb_debug_buf   *hr_db_livenodes;
        struct o2hb_debug_buf   *hr_db_regnum;
        struct o2hb_debug_buf   *hr_db_elapsed_time;
+       struct o2hb_debug_buf   *hr_db_pinned;
  
        /* let the person setting up hb wait for it to return until it
         * has reached a 'steady' state.  This will be fixed when we have
@@@ -307,7 -340,8 +340,7 @@@ static void o2hb_arm_write_timeout(stru
  
  static void o2hb_disarm_write_timeout(struct o2hb_region *reg)
  {
 -      cancel_delayed_work(&reg->hr_write_timeout_work);
 -      flush_scheduled_work();
 +      cancel_delayed_work_sync(&reg->hr_write_timeout_work);
  }
  
  static inline void o2hb_bio_wait_init(struct o2hb_bio_wait_ctxt *wc)
@@@ -701,6 -735,14 +734,14 @@@ static void o2hb_set_quorum_device(stru
               config_item_name(&reg->hr_item));
  
        set_bit(reg->hr_region_num, o2hb_quorum_region_bitmap);
+       /*
+        * If global heartbeat active, unpin all regions if the
+        * region count > CUT_OFF
+        */
+       if (o2hb_pop_count(&o2hb_quorum_region_bitmap,
+                          O2NM_MAX_REGIONS) > O2HB_PIN_CUT_OFF)
+               o2hb_region_unpin(NULL);
  }
  
  static int o2hb_check_slot(struct o2hb_region *reg,
@@@ -1041,6 -1083,9 +1082,9 @@@ static int o2hb_thread(void *data
  
        set_user_nice(current, -20);
  
+       /* Pin node */
+       o2nm_depend_this_node();
        while (!kthread_should_stop() && !reg->hr_unclean_stop) {
                /* We track the time spent inside
                 * o2hb_do_disk_heartbeat so that we avoid more than
                mlog_errno(ret);
        }
  
+       /* Unpin node */
+       o2nm_undepend_this_node();
        mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread exiting\n");
  
        return 0;
@@@ -1142,6 -1190,12 +1189,12 @@@ static int o2hb_debug_open(struct inod
                                                 reg->hr_last_timeout_start));
                goto done;
  
+       case O2HB_DB_TYPE_REGION_PINNED:
+               reg = (struct o2hb_region *)db->db_data;
+               out += snprintf(buf + out, PAGE_SIZE - out, "%u\n",
+                               !!reg->hr_item_pinned);
+               goto done;
        default:
                goto done;
        }
@@@ -1315,6 -1369,8 +1368,8 @@@ int o2hb_init(void
        memset(o2hb_quorum_region_bitmap, 0, sizeof(o2hb_quorum_region_bitmap));
        memset(o2hb_failed_region_bitmap, 0, sizeof(o2hb_failed_region_bitmap));
  
+       o2hb_dependent_users = 0;
        return o2hb_debug_init();
  }
  
@@@ -1384,6 -1440,7 +1439,7 @@@ static void o2hb_region_release(struct 
        debugfs_remove(reg->hr_debug_livenodes);
        debugfs_remove(reg->hr_debug_regnum);
        debugfs_remove(reg->hr_debug_elapsed_time);
+       debugfs_remove(reg->hr_debug_pinned);
        debugfs_remove(reg->hr_debug_dir);
  
        spin_lock(&o2hb_live_lock);
@@@ -1948,6 -2005,18 +2004,18 @@@ static int o2hb_debug_region_init(struc
                goto bail;
        }
  
+       reg->hr_debug_pinned =
+                       o2hb_debug_create(O2HB_DEBUG_REGION_PINNED,
+                                         reg->hr_debug_dir,
+                                         &(reg->hr_db_pinned),
+                                         sizeof(*(reg->hr_db_pinned)),
+                                         O2HB_DB_TYPE_REGION_PINNED,
+                                         0, 0, reg);
+       if (!reg->hr_debug_pinned) {
+               mlog_errno(ret);
+               goto bail;
+       }
        ret = 0;
  bail:
        return ret;
@@@ -2002,15 -2071,20 +2070,20 @@@ static void o2hb_heartbeat_group_drop_i
  {
        struct task_struct *hb_task;
        struct o2hb_region *reg = to_o2hb_region(item);
+       int quorum_region = 0;
  
        /* stop the thread when the user removes the region dir */
        spin_lock(&o2hb_live_lock);
        if (o2hb_global_heartbeat_active()) {
                clear_bit(reg->hr_region_num, o2hb_region_bitmap);
                clear_bit(reg->hr_region_num, o2hb_live_region_bitmap);
+               if (test_bit(reg->hr_region_num, o2hb_quorum_region_bitmap))
+                       quorum_region = 1;
+               clear_bit(reg->hr_region_num, o2hb_quorum_region_bitmap);
        }
        hb_task = reg->hr_task;
        reg->hr_task = NULL;
+       reg->hr_item_dropped = 1;
        spin_unlock(&o2hb_live_lock);
  
        if (hb_task)
        if (o2hb_global_heartbeat_active())
                printk(KERN_NOTICE "o2hb: Heartbeat stopped on region %s\n",
                       config_item_name(&reg->hr_item));
        config_item_put(item);
+       if (!o2hb_global_heartbeat_active() || !quorum_region)
+               return;
+       /*
+        * If global heartbeat active and there are dependent users,
+        * pin all regions if quorum region count <= CUT_OFF
+        */
+       spin_lock(&o2hb_live_lock);
+       if (!o2hb_dependent_users)
+               goto unlock;
+       if (o2hb_pop_count(&o2hb_quorum_region_bitmap,
+                          O2NM_MAX_REGIONS) <= O2HB_PIN_CUT_OFF)
+               o2hb_region_pin(NULL);
+ unlock:
+       spin_unlock(&o2hb_live_lock);
  }
  
  struct o2hb_heartbeat_group_attribute {
@@@ -2214,63 -2308,138 +2307,138 @@@ void o2hb_setup_callback(struct o2hb_ca
  }
  EXPORT_SYMBOL_GPL(o2hb_setup_callback);
  
- static struct o2hb_region *o2hb_find_region(const char *region_uuid)
+ /*
+  * In local heartbeat mode, region_uuid passed matches the dlm domain name.
+  * In global heartbeat mode, region_uuid passed is NULL.
+  *
+  * In local, we only pin the matching region. In global we pin all the active
+  * regions.
+  */
+ static int o2hb_region_pin(const char *region_uuid)
  {
-       struct o2hb_region *p, *reg = NULL;
+       int ret = 0, found = 0;
+       struct o2hb_region *reg;
+       char *uuid;
  
        assert_spin_locked(&o2hb_live_lock);
  
-       list_for_each_entry(p, &o2hb_all_regions, hr_all_item) {
-               if (!strcmp(region_uuid, config_item_name(&p->hr_item))) {
-                       reg = p;
-                       break;
+       list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) {
+               uuid = config_item_name(&reg->hr_item);
+               /* local heartbeat */
+               if (region_uuid) {
+                       if (strcmp(region_uuid, uuid))
+                               continue;
+                       found = 1;
+               }
+               if (reg->hr_item_pinned || reg->hr_item_dropped)
+                       goto skip_pin;
+               /* Ignore ENOENT only for local hb (userdlm domain) */
+               ret = o2nm_depend_item(&reg->hr_item);
+               if (!ret) {
+                       mlog(ML_CLUSTER, "Pin region %s\n", uuid);
+                       reg->hr_item_pinned = 1;
+               } else {
+                       if (ret == -ENOENT && found)
+                               ret = 0;
+                       else {
+                               mlog(ML_ERROR, "Pin region %s fails with %d\n",
+                                    uuid, ret);
+                               break;
+                       }
                }
+ skip_pin:
+               if (found)
+                       break;
        }
  
-       return reg;
+       return ret;
  }
  
- static int o2hb_region_get(const char *region_uuid)
+ /*
+  * In local heartbeat mode, region_uuid passed matches the dlm domain name.
+  * In global heartbeat mode, region_uuid passed is NULL.
+  *
+  * In local, we only unpin the matching region. In global we unpin all the
+  * active regions.
+  */
+ static void o2hb_region_unpin(const char *region_uuid)
  {
-       int ret = 0;
        struct o2hb_region *reg;
+       char *uuid;
+       int found = 0;
  
-       spin_lock(&o2hb_live_lock);
+       assert_spin_locked(&o2hb_live_lock);
  
-       reg = o2hb_find_region(region_uuid);
-       if (!reg)
-               ret = -ENOENT;
-       spin_unlock(&o2hb_live_lock);
+       list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) {
+               uuid = config_item_name(&reg->hr_item);
+               if (region_uuid) {
+                       if (strcmp(region_uuid, uuid))
+                               continue;
+                       found = 1;
+               }
  
-       if (ret)
-               goto out;
+               if (reg->hr_item_pinned) {
+                       mlog(ML_CLUSTER, "Unpin region %s\n", uuid);
+                       o2nm_undepend_item(&reg->hr_item);
+                       reg->hr_item_pinned = 0;
+               }
+               if (found)
+                       break;
+       }
+ }
  
-       ret = o2nm_depend_this_node();
-       if (ret)
-               goto out;
+ static int o2hb_region_inc_user(const char *region_uuid)
+ {
+       int ret = 0;
  
-       ret = o2nm_depend_item(&reg->hr_item);
-       if (ret)
-               o2nm_undepend_this_node();
+       spin_lock(&o2hb_live_lock);
  
- out:
+       /* local heartbeat */
+       if (!o2hb_global_heartbeat_active()) {
+           ret = o2hb_region_pin(region_uuid);
+           goto unlock;
+       }
+       /*
+        * if global heartbeat active and this is the first dependent user,
+        * pin all regions if quorum region count <= CUT_OFF
+        */
+       o2hb_dependent_users++;
+       if (o2hb_dependent_users > 1)
+               goto unlock;
+       if (o2hb_pop_count(&o2hb_quorum_region_bitmap,
+                          O2NM_MAX_REGIONS) <= O2HB_PIN_CUT_OFF)
+               ret = o2hb_region_pin(NULL);
+ unlock:
+       spin_unlock(&o2hb_live_lock);
        return ret;
  }
  
static void o2hb_region_put(const char *region_uuid)
void o2hb_region_dec_user(const char *region_uuid)
  {
-       struct o2hb_region *reg;
        spin_lock(&o2hb_live_lock);
  
-       reg = o2hb_find_region(region_uuid);
+       /* local heartbeat */
+       if (!o2hb_global_heartbeat_active()) {
+           o2hb_region_unpin(region_uuid);
+           goto unlock;
+       }
  
-       spin_unlock(&o2hb_live_lock);
+       /*
+        * if global heartbeat active and there are no dependent users,
+        * unpin all quorum regions
+        */
+       o2hb_dependent_users--;
+       if (!o2hb_dependent_users)
+               o2hb_region_unpin(NULL);
  
-       if (reg) {
-               o2nm_undepend_item(&reg->hr_item);
-               o2nm_undepend_this_node();
-       }
+ unlock:
+       spin_unlock(&o2hb_live_lock);
  }
  
  int o2hb_register_callback(const char *region_uuid,
        }
  
        if (region_uuid) {
-               ret = o2hb_region_get(region_uuid);
-               if (ret)
+               ret = o2hb_region_inc_user(region_uuid);
+               if (ret) {
+                       mlog_errno(ret);
                        goto out;
+               }
        }
  
        down_write(&o2hb_callback_sem);
        up_write(&o2hb_callback_sem);
        ret = 0;
  out:
-       mlog(ML_HEARTBEAT, "returning %d on behalf of %p for funcs %p\n",
+       mlog(ML_CLUSTER, "returning %d on behalf of %p for funcs %p\n",
             ret, __builtin_return_address(0), hc);
        return ret;
  }
@@@ -2322,7 -2493,7 +2492,7 @@@ void o2hb_unregister_callback(const cha
  {
        BUG_ON(hc->hc_magic != O2HB_CB_MAGIC);
  
-       mlog(ML_HEARTBEAT, "on behalf of %p for funcs %p\n",
+       mlog(ML_CLUSTER, "on behalf of %p for funcs %p\n",
             __builtin_return_address(0), hc);
  
        /* XXX Can this happen _with_ a region reference? */
                return;
  
        if (region_uuid)
-               o2hb_region_put(region_uuid);
+               o2hb_region_dec_user(region_uuid);
  
        down_write(&o2hb_callback_sem);
  
diff --combined fs/ocfs2/namei.c
@@@ -147,7 -147,7 +147,7 @@@ static struct dentry *ocfs2_lookup(stru
        spin_unlock(&oi->ip_lock);
  
  bail_add:
 -      dentry->d_op = &ocfs2_dentry_ops;
 +      d_set_d_op(dentry, &ocfs2_dentry_ops);
        ret = d_splice_alias(inode, dentry);
  
        if (inode) {
@@@ -415,7 -415,7 +415,7 @@@ static int ocfs2_mknod(struct inode *di
                mlog_errno(status);
                goto leave;
        }
 -      dentry->d_op = &ocfs2_dentry_ops;
 +      d_set_d_op(dentry, &ocfs2_dentry_ops);
  
        status = ocfs2_add_entry(handle, dentry, inode,
                                 OCFS2_I(inode)->ip_blkno, parent_fe_bh,
@@@ -743,7 -743,7 +743,7 @@@ static int ocfs2_link(struct dentry *ol
        }
  
        ihold(inode);
 -      dentry->d_op = &ocfs2_dentry_ops;
 +      d_set_d_op(dentry, &ocfs2_dentry_ops);
        d_instantiate(dentry, inode);
  
  out_commit:
@@@ -1017,8 -1017,11 +1017,11 @@@ static int ocfs2_double_lock(struct ocf
                 * An error return must mean that no cluster locks
                 * were held on function exit.
                 */
-               if (oi1->ip_blkno != oi2->ip_blkno)
+               if (oi1->ip_blkno != oi2->ip_blkno) {
                        ocfs2_inode_unlock(inode2, 1);
+                       brelse(*bh2);
+                       *bh2 = NULL;
+               }
  
                if (status != -ENOENT)
                        mlog_errno(status);
@@@ -1794,7 -1797,7 +1797,7 @@@ static int ocfs2_symlink(struct inode *
                mlog_errno(status);
                goto bail;
        }
 -      dentry->d_op = &ocfs2_dentry_ops;
 +      d_set_d_op(dentry, &ocfs2_dentry_ops);
  
        status = ocfs2_add_entry(handle, dentry, inode,
                                 le64_to_cpu(fe->i_blkno), parent_fe_bh,
@@@ -2459,7 -2462,7 +2462,7 @@@ int ocfs2_mv_orphaned_inode_to_new(stru
                goto out_commit;
        }
  
 -      dentry->d_op = &ocfs2_dentry_ops;
 +      d_set_d_op(dentry, &ocfs2_dentry_ops);
        d_instantiate(dentry, inode);
        status = 0;
  out_commit: