1. 23 Dec, 2009 40 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · f988dac7
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        Staging/vt66*: kconfig, depends on WLAN
        Staging: batman-adv: introduce missing kfree
        Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET.
        Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig
        Staging: panel: Fix compilation error with custom lcd charset
        Staging: ramzswap: remove ARM specific d-cache hack
        Staging: rtl8192x: fix printk formats
        Staging: wlan-ng: fix Correct size given to memset
        staging: rtl8192su: add USB VID/PID for HWNUm-300
        staging: fix rtl8192su compilation errors with mac80211
        staging: fix rtl8192e compilation errors with mac80211
        Staging: fix rtl8187se compilation errors with mac80211
        Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr()
        Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.
        Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
        Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty
        Staging: dst: remove from the tree
        Staging: sm7xx: add a new framebuffer driver
        Staging: batman: fix debug Kconfig option
      f988dac7
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2 · 849254e9
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
        ocfs2: Set i_nlink properly during reflink.
        ocfs2: Add reflinked file's inode to inode hash eariler.
        ocfs2: refcounttree.c cleanup.
        ocfs2: Find proper end cpos for a leaf refcount block.
      849254e9
    • Randy Dunlap's avatar
      Staging/vt66*: kconfig, depends on WLAN · b2cd4149
      Randy Dunlap authored
      The vt665[56] drivers can be built when CONFIG_NET=n &
      CONFIG_NETDEVICES=n or just when CONFIG_WLAN=n.
      This leads to build failures.
      Prevent this by making them depend on WLAN.
      
      [This patch was lost in a dualing trees merge;
      still needs to be re-applied.]
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b2cd4149
    • Julia Lawall's avatar
      Staging: batman-adv: introduce missing kfree · e281cf89
      Julia Lawall authored
      Error handling code following a kzalloc should free the allocated data.
      Similarly for usb-alloc urb.
      
      The semantic match that finds the first problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      e281cf89
    • Andrew Lunn's avatar
    • Peter Huewe's avatar
      Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig · ae08961a
      Peter Huewe authored
      In panel.c there are only the values 0-3 defined. So 4 is invalid:
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Cc: Willy Tarreau <w@1wt.eu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ae08961a
    • Peter Huewe's avatar
      Staging: panel: Fix compilation error with custom lcd charset · a6a6c908
      Peter Huewe authored
      When compiling panel.c with a DEFAULT_LCD_CHARSET it fails to compile
      with the following error message:
      drivers/staging/panel/panel.c: In function >>lcd_init<<:
      drivers/staging/panel/panel.c:1396: error: expected expression before
      >>;<< token
      drivers/staging/panel/panel.c:1475: error: expected expression before
      >>;<< token
      make[3]: *** [drivers/staging/panel/panel.o] error 1
      make[2]: *** [drivers/staging/panel] error 2
      make[1]: *** [drivers/staging] error 2
      
      The config used was:
      CONFIG_PANEL=m
      CONFIG_PANEL_PARPORT=0
      CONFIG_PANEL_PROFILE=0
      CONFIG_PANEL_KEYPAD=0
      CONFIG_PANEL_LCD=1
      CONFIG_PANEL_LCD_HEIGHT=2
      CONFIG_PANEL_LCD_WIDTH=20
      CONFIG_PANEL_LCD_BWIDTH=40
      CONFIG_PANEL_LCD_HWIDTH=64
      CONFIG_PANEL_LCD_CHARSET=0
      CONFIG_PANEL_LCD_PROTO=0
      CONFIG_PANEL_LCD_PIN_E=14
      CONFIG_PANEL_LCD_PIN_RS=17
      CONFIG_PANEL_LCD_PIN_RW=16
      CONFIG_PANEL_LCD_PIN_BL=0
      
      This patch fixes both errors, as it fixes the define
      Patch against current linux-next tree at Tue Dec 15 06:07:01 2009 +0100
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Acked-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a6a6c908
    • Nitin Gupta's avatar
      Staging: ramzswap: remove ARM specific d-cache hack · 30fb8a71
      Nitin Gupta authored
      Remove d-cache hack in ramzswap driver that was needed
      to workaround a bug in ARM version of update_mmu_cache()
      which caused stale data in d-cache to be transferred to
      userspace. This bug was fixed by git commit:
      	787b2faa
      This also brings down one entry in TODO file.
      Signed-off-by: default avatarNitin Gupta <ngupta@vflare.org>
      Acked-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      30fb8a71
    • Randy Dunlap's avatar
      Staging: rtl8192x: fix printk formats · 3d8affc0
      Randy Dunlap authored
      Fix printk format warnings in rtl8192[eu]:
      
      drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c:979: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
      drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:385: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
      drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:484: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
      drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:614: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
      drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:848: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
      drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:343: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
      drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:442: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
      drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:572: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3d8affc0
    • Julia Lawall's avatar
      Staging: wlan-ng: fix Correct size given to memset · 4068fe8b
      Julia Lawall authored
      Memset should be given the size of the structure, not the size of the pointer.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      type T;
      T *x;
      expression E;
      @@
      
      memset(x, E, sizeof(
      + *
       x))
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      4068fe8b
    • Stephane Glondu's avatar
      staging: rtl8192su: add USB VID/PID for HWNUm-300 · 488d3749
      Stephane Glondu authored
      The Hercules Wireless N USB mini (HWNUm-300) uses the RTL8191S chipset
      and seems to work with this driver.
      Signed-off-by: default avatarStephane Glondu <steph@glondu.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      488d3749
    • George Kadianakis's avatar
      staging: fix rtl8192su compilation errors with mac80211 · 55c7d5fc
      George Kadianakis authored
      This patch series fixes compilation problems that were caused by
      function naming conflicts between the rtl8192su driver and the
      mac80211 stack.
      
      Signed-off-by: George Kadianakis <desnacked at gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      55c7d5fc
    • George Kadianakis's avatar
      staging: fix rtl8192e compilation errors with mac80211 · fb5fe277
      George Kadianakis authored
      This patch series fixes compilation problems that were caused by
      function naming conflicts between the rtl8192e driver and the
      mac80211 stack.
      
      Signed-off-by: George Kadianakis <desnacked at gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fb5fe277
    • George Kadianakis's avatar
      Staging: fix rtl8187se compilation errors with mac80211 · df574b8e
      George Kadianakis authored
      This patch fixes compilation problems that were caused by function
      naming conflicts between the rtl8187se driver and the mac80211 stack.
      
      Signed-off-by: George Kadianakis <desnacked at gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      df574b8e
    • Roel Kluin's avatar
      Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr() · aad445f8
      Roel Kluin authored
      The error tested for is negative
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      aad445f8
    • Ian Abbott's avatar
      Staging: comedi: jr3_pci: Don't ioremap too much space. Check result. · fa5c5f4c
      Ian Abbott authored
      For the JR3/PCI cards, the size of the PCIBAR0 region depends on the
      number of channels.  Don't try and ioremap space for 4 channels if the
      card has fewer channels.  Also check for ioremap failure.
      
      Thanks to Anders Blomdell for input and Sami Hussein for testing.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fa5c5f4c
    • Bernd Porr's avatar
      Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK · d103bef4
      Bernd Porr authored
      The flag COMEDI_CB_BLOCK was marked as "depricated in the header file".
      However, this flag is important to wake up the data-reader (and writer)
      after new data has arrived from(for) the DAQ card.
      Signed-off-by: default avatarBernd Porr <berndporr@f2s.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d103bef4
    • Bernd Porr's avatar
      Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty · d4c3a565
      Bernd Porr authored
      Jan-Matthias Braun spotted a bug which locks up the driver when the
      comedi ring buffer runs empty and provided a patch. The driver would
      still send the data to comedi but the reader won't wake up any more.
      What's required is setting the flag COMEDI_CB_BLOCK after new data has
      arrived which wakes up the reader and therefore the read() command.
      Signed-off-by: default avatarBernd Porr <berndporr@f2s.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d4c3a565
    • Greg Kroah-Hartman's avatar
      Staging: dst: remove from the tree · 29d249ed
      Greg Kroah-Hartman authored
      DST is dead, no one is using it and upstream
      has abandoned it, so remove it from the tree because
      it is not going anywhere.
      Acked-by: default avatarEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      29d249ed
    • Wu Zhangjin's avatar
      Staging: sm7xx: add a new framebuffer driver · d7edf479
      Wu Zhangjin authored
      Yeeloong netbook has a sm712 video card, need this driver, but it is not
      ready to upstream yet, so, go to drivers/staing at first.
      
      This source code is originally from Silicon Motion Technology Corp, and
      maintained at http://dev.lemote.com/code/linux_loongson for YeeLoong
      netbook. I have done a lot of cleanups for it and merged it into my git
      repository at http://dev.lemote.com/code/rt4ls.
      
      Thanks to Simon for testing it on a little-endian x86 platform.
      
      Thanks to Olivier Croset <olivier.croset@actis-computer.com> for
      reporting the problem about __BIG_ENDIAN compiling problem and send a
      relative patch.
      
      The suspend/resume and blank support are contributed by Jason from
      Silicon Motion Technology.
      Tested-by: default avatarSimon Braunschmidt <sbraun@emlix.com>
      Signed-off-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d7edf479
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 · 6f403346
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
        ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
        ASoC: Do not write to invalid registers on the wm9712.
        ALSA: hda - Set mixer name after codec patch
        ASoC: add missing parameter to mx27vis_hifi_hw_free()
        ASoC: sh: FSI:: don't check platform_get_irq's return value against zero
        ALSA: sound/core/pcm_timer.c: use lib/gcd.c
        ALSA: hda - Add MSI blacklist
        ALSA: hda - Add support for the new 27 inch IMacs
        ALSA: hda - Fix NULL dereference with enable_beep=0 option
      6f403346
    • Greg Kroah-Hartman's avatar
    • Takashi Iwai's avatar
      Merge branch 'fix/hda' into for-linus · 54a26089
      Takashi Iwai authored
      54a26089
    • Takashi Iwai's avatar
      Merge branch 'fix/asoc' into for-linus · 3095b165
      Takashi Iwai authored
      3095b165
    • Takashi Iwai's avatar
      Merge branch 'fix/misc' into for-linus · 4dc2ec09
      Takashi Iwai authored
      4dc2ec09
    • Anisse Astier's avatar
      95e70e87
    • Randy Dunlap's avatar
      kfifo: fix Error/broken kernel-doc notation · 9c717de9
      Randy Dunlap authored
      Fix kernel-doc errors and warnings in new header file kfifo.h.
      Don't use kernel-doc "/**" for internal functions whose comments
      are not in kernel-doc format.
      
      kernel-doc section header names (like "Note:") must be unique
      per function.  Looks like I need to document that.
      
        Error(include/linux/kfifo.h:76): duplicate section name 'Note'
        Warning(include/linux/kfifo.h:88): Excess function parameter 'size' description in 'INIT_KFIFO'
        Error(include/linux/kfifo.h:101): duplicate section name 'Note'
        Warning(include/linux/kfifo.h:257): No description found for parameter 'fifo'
          (many of this last type, from internal functions)
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Stefani Seibold <stefani@seibold.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c717de9
    • Linus Torvalds's avatar
      Merge branch 'sched-fixes-for-linus' of... · 6432ed64
      Linus Torvalds authored
      Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        sched: Revert 738d2be4, simplify set_task_cpu()
      6432ed64
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 · 94e5165a
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
        quota: Improve checking of quota file header
        jbd: jbd-debug and jbd2-debug should be writable
        ext4: fix sleep inside spinlock issue with quota and dealloc (#14739)
        ext4: Fix potential quota deadlock
        quota: Fix 64-bit limits setting on 32-bit archs
        ext3: Replace lock/unlock_super() with an explicit lock for resizing
        ext3: Replace lock/unlock_super() with an explicit lock for the orphan list
        ext3: ext3_mark_recovery_complete() doesn't need to use lock_super
        ext3: Remove outdated comment about lock_super()
        quota: Move duplicated code to separate functions
        ext4: Convert to generic reserved quota's space management.
        quota: decouple fs reserved space from quota reservation
        Add unlocked version of inode_add_bytes() function
        ext3: quota macros cleanup [V2]
      94e5165a
    • Linus Torvalds's avatar
      Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · f42ecb28
      Linus Torvalds authored
      * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (35 commits)
        drm/radeon/kms: add definitions for v4 power tables
        drm/radeon/kms: never combine LVDS with another encoder
        drm/radeon/kms: Check module arguments to be valid V2
        drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structure
        drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4)
        drm/radeon/kms: add 3DC compression support
        drm/radeon/kms: allow rendering while no colorbuffer is set on r300
        drm/radeon/kms: enable memory clock reading on legacy (V2)
        drm/radeon/kms: prevent parallel AtomBIOS calls
        drm/radeon/kms: set proper default tv standard
        drm/radeon/kms: fix legacy rmx
        drm/radeon/kms/atom: fill in proper defines for digital setup
        drm/kms: silencing a false positive warning.
        drm/mm: fix logic for selection of best fit block
        drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles.
        drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.
        drm/vmwgfx: Fix unlocked ioctl and add proper access control
        drm/radeon: fix build on 64-bit with some compilers.
        drivers/gpu: Use kzalloc for allocating only one thing
        DRM: Rename clamp variable
        ...
      f42ecb28
    • Stefani Seibold's avatar
      Fix usb_serial_probe() problem introduced by the recent kfifo changes · 119eecc8
      Stefani Seibold authored
      The USB serial code was a new user of the kfifo API, and it was missed
      when porting things to the new kfifo API.
      
      Please make the write_fifo in place.  Here is my patch to fix the
      regression and full ported version.
      Signed-off-by: default avatarStefani Seibold <stefani@seibold.net>
      Reported-and-tested-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      119eecc8
    • Eric Millbrandt's avatar
      ASoC: Do not write to invalid registers on the wm9712. · 48e3cbb3
      Eric Millbrandt authored
      This patch fixes a bug where "virtual" registers were being written to the ac97
      bus.  This was causing unrelated registers to become corrupted (headphone 0x04,
      touchscreen 0x78, etc).
      
      This patch duplicates protection that was included in the wm9713 driver.
      Signed-off-by: default avatarEric Millbrandt <emillbrandt@dekaresearch.com>
      Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: stable@kernel.org
      48e3cbb3
    • Jan Kara's avatar
      quota: Improve checking of quota file header · 869835df
      Jan Kara authored
      When we are asked for vfsv0 quota format and the file is in vfsv1
      format (or vice versa), refuse to use the quota file. Also return
      with error when we don't like the header of quota file.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      869835df
    • Yin Kangkai's avatar
      jbd: jbd-debug and jbd2-debug should be writable · 765f8361
      Yin Kangkai authored
      jbd-debug and jbd2-debug is currently read-only (S_IRUGO), which is not
      correct. Make it writable so that we can start debuging.
      Signed-off-by: default avatarYin Kangkai <kangkai.yin@intel.com>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      765f8361
    • Dmitry Monakhov's avatar
      ext4: fix sleep inside spinlock issue with quota and dealloc (#14739) · 39bc680a
      Dmitry Monakhov authored
      Unlock i_block_reservation_lock before vfs_dq_reserve_block().
      This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=14739
      
      CC: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      39bc680a
    • Dmitry Monakhov's avatar
      ext4: Fix potential quota deadlock · d21cd8f1
      Dmitry Monakhov authored
      We have to delay vfs_dq_claim_space() until allocation context destruction.
      Currently we have following call-trace:
      ext4_mb_new_blocks()
        /* task is already holding ac->alloc_semp */
       ->ext4_mb_mark_diskspace_used
          ->vfs_dq_claim_space()  /*  acquire dqptr_sem here. Possible deadlock */
       ->ext4_mb_release_context() /* drop ac->alloc_semp here */
      
      Let's move quota claiming to ext4_da_update_reserve_space()
      
       =======================================================
       [ INFO: possible circular locking dependency detected ]
       2.6.32-rc7 #18
       -------------------------------------------------------
       write-truncate-/3465 is trying to acquire lock:
        (&s->s_dquot.dqptr_sem){++++..}, at: [<c025e73b>] dquot_claim_space+0x3b/0x1b0
      
       but task is already holding lock:
        (&meta_group_info[i]->alloc_sem){++++..}, at: [<c02ce962>] ext4_mb_load_buddy+0xb2/0x370
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
       -> #3 (&meta_group_info[i]->alloc_sem){++++..}:
              [<c017d04b>] __lock_acquire+0xd7b/0x1260
              [<c017d5ea>] lock_acquire+0xba/0xd0
              [<c0527191>] down_read+0x51/0x90
              [<c02ce962>] ext4_mb_load_buddy+0xb2/0x370
              [<c02d0c1c>] ext4_mb_free_blocks+0x46c/0x870
              [<c029c9d3>] ext4_free_blocks+0x73/0x130
              [<c02c8cfc>] ext4_ext_truncate+0x76c/0x8d0
              [<c02a8087>] ext4_truncate+0x187/0x5e0
              [<c01e0f7b>] vmtruncate+0x6b/0x70
              [<c022ec02>] inode_setattr+0x62/0x190
              [<c02a2d7a>] ext4_setattr+0x25a/0x370
              [<c022ee81>] notify_change+0x151/0x340
              [<c021349d>] do_truncate+0x6d/0xa0
              [<c0221034>] may_open+0x1d4/0x200
              [<c022412b>] do_filp_open+0x1eb/0x910
              [<c021244d>] do_sys_open+0x6d/0x140
              [<c021258e>] sys_open+0x2e/0x40
              [<c0103100>] sysenter_do_call+0x12/0x32
      
       -> #2 (&ei->i_data_sem){++++..}:
              [<c017d04b>] __lock_acquire+0xd7b/0x1260
              [<c017d5ea>] lock_acquire+0xba/0xd0
              [<c0527191>] down_read+0x51/0x90
              [<c02a5787>] ext4_get_blocks+0x47/0x450
              [<c02a74c1>] ext4_getblk+0x61/0x1d0
              [<c02a7a7f>] ext4_bread+0x1f/0xa0
              [<c02bcddc>] ext4_quota_write+0x12c/0x310
              [<c0262d23>] qtree_write_dquot+0x93/0x120
              [<c0261708>] v2_write_dquot+0x28/0x30
              [<c025d3fb>] dquot_commit+0xab/0xf0
              [<c02be977>] ext4_write_dquot+0x77/0x90
              [<c02be9bf>] ext4_mark_dquot_dirty+0x2f/0x50
              [<c025e321>] dquot_alloc_inode+0x101/0x180
              [<c029fec2>] ext4_new_inode+0x602/0xf00
              [<c02ad789>] ext4_create+0x89/0x150
              [<c0221ff2>] vfs_create+0xa2/0xc0
              [<c02246e7>] do_filp_open+0x7a7/0x910
              [<c021244d>] do_sys_open+0x6d/0x140
              [<c021258e>] sys_open+0x2e/0x40
              [<c0103100>] sysenter_do_call+0x12/0x32
      
       -> #1 (&sb->s_type->i_mutex_key#7/4){+.+...}:
              [<c017d04b>] __lock_acquire+0xd7b/0x1260
              [<c017d5ea>] lock_acquire+0xba/0xd0
              [<c0526505>] mutex_lock_nested+0x65/0x2d0
              [<c0260c9d>] vfs_load_quota_inode+0x4bd/0x5a0
              [<c02610af>] vfs_quota_on_path+0x5f/0x70
              [<c02bc812>] ext4_quota_on+0x112/0x190
              [<c026345a>] sys_quotactl+0x44a/0x8a0
              [<c0103100>] sysenter_do_call+0x12/0x32
      
       -> #0 (&s->s_dquot.dqptr_sem){++++..}:
              [<c017d361>] __lock_acquire+0x1091/0x1260
              [<c017d5ea>] lock_acquire+0xba/0xd0
              [<c0527191>] down_read+0x51/0x90
              [<c025e73b>] dquot_claim_space+0x3b/0x1b0
              [<c02cb95f>] ext4_mb_mark_diskspace_used+0x36f/0x380
              [<c02d210a>] ext4_mb_new_blocks+0x34a/0x530
              [<c02c83fb>] ext4_ext_get_blocks+0x122b/0x13c0
              [<c02a5966>] ext4_get_blocks+0x226/0x450
              [<c02a5ff3>] mpage_da_map_blocks+0xc3/0xaa0
              [<c02a6ed6>] ext4_da_writepages+0x506/0x790
              [<c01de272>] do_writepages+0x22/0x50
              [<c01d766d>] __filemap_fdatawrite_range+0x6d/0x80
              [<c01d7b9b>] filemap_flush+0x2b/0x30
              [<c02a40ac>] ext4_alloc_da_blocks+0x5c/0x60
              [<c029e595>] ext4_release_file+0x75/0xb0
              [<c0216b59>] __fput+0xf9/0x210
              [<c0216c97>] fput+0x27/0x30
              [<c02122dc>] filp_close+0x4c/0x80
              [<c014510e>] put_files_struct+0x6e/0xd0
              [<c01451b7>] exit_files+0x47/0x60
              [<c0146a24>] do_exit+0x144/0x710
              [<c0147028>] do_group_exit+0x38/0xa0
              [<c0159abc>] get_signal_to_deliver+0x2ac/0x410
              [<c0102849>] do_notify_resume+0xb9/0x890
              [<c01032d2>] work_notifysig+0x13/0x21
      
       other info that might help us debug this:
      
       3 locks held by write-truncate-/3465:
        #0:  (jbd2_handle){+.+...}, at: [<c02e1f8f>] start_this_handle+0x38f/0x5c0
        #1:  (&ei->i_data_sem){++++..}, at: [<c02a57f6>] ext4_get_blocks+0xb6/0x450
        #2:  (&meta_group_info[i]->alloc_sem){++++..}, at: [<c02ce962>] ext4_mb_load_buddy+0xb2/0x370
      
       stack backtrace:
       Pid: 3465, comm: write-truncate- Not tainted 2.6.32-rc7 #18
       Call Trace:
        [<c0524cb3>] ? printk+0x1d/0x22
        [<c017ac9a>] print_circular_bug+0xca/0xd0
        [<c017d361>] __lock_acquire+0x1091/0x1260
        [<c016bca2>] ? sched_clock_local+0xd2/0x170
        [<c0178fd0>] ? trace_hardirqs_off_caller+0x20/0xd0
        [<c017d5ea>] lock_acquire+0xba/0xd0
        [<c025e73b>] ? dquot_claim_space+0x3b/0x1b0
        [<c0527191>] down_read+0x51/0x90
        [<c025e73b>] ? dquot_claim_space+0x3b/0x1b0
        [<c025e73b>] dquot_claim_space+0x3b/0x1b0
        [<c02cb95f>] ext4_mb_mark_diskspace_used+0x36f/0x380
        [<c02d210a>] ext4_mb_new_blocks+0x34a/0x530
        [<c02c601d>] ? ext4_ext_find_extent+0x25d/0x280
        [<c02c83fb>] ext4_ext_get_blocks+0x122b/0x13c0
        [<c016bca2>] ? sched_clock_local+0xd2/0x170
        [<c016be60>] ? sched_clock_cpu+0x120/0x160
        [<c016beef>] ? cpu_clock+0x4f/0x60
        [<c0178fd0>] ? trace_hardirqs_off_caller+0x20/0xd0
        [<c052712c>] ? down_write+0x8c/0xa0
        [<c02a5966>] ext4_get_blocks+0x226/0x450
        [<c016be60>] ? sched_clock_cpu+0x120/0x160
        [<c016beef>] ? cpu_clock+0x4f/0x60
        [<c017908b>] ? trace_hardirqs_off+0xb/0x10
        [<c02a5ff3>] mpage_da_map_blocks+0xc3/0xaa0
        [<c01d69cc>] ? find_get_pages_tag+0x16c/0x180
        [<c01d6860>] ? find_get_pages_tag+0x0/0x180
        [<c02a73bd>] ? __mpage_da_writepage+0x16d/0x1a0
        [<c01dfc4e>] ? pagevec_lookup_tag+0x2e/0x40
        [<c01ddf1b>] ? write_cache_pages+0xdb/0x3d0
        [<c02a7250>] ? __mpage_da_writepage+0x0/0x1a0
        [<c02a6ed6>] ext4_da_writepages+0x506/0x790
        [<c016beef>] ? cpu_clock+0x4f/0x60
        [<c016bca2>] ? sched_clock_local+0xd2/0x170
        [<c016be60>] ? sched_clock_cpu+0x120/0x160
        [<c016be60>] ? sched_clock_cpu+0x120/0x160
        [<c02a69d0>] ? ext4_da_writepages+0x0/0x790
        [<c01de272>] do_writepages+0x22/0x50
        [<c01d766d>] __filemap_fdatawrite_range+0x6d/0x80
        [<c01d7b9b>] filemap_flush+0x2b/0x30
        [<c02a40ac>] ext4_alloc_da_blocks+0x5c/0x60
        [<c029e595>] ext4_release_file+0x75/0xb0
        [<c0216b59>] __fput+0xf9/0x210
        [<c0216c97>] fput+0x27/0x30
        [<c02122dc>] filp_close+0x4c/0x80
        [<c014510e>] put_files_struct+0x6e/0xd0
        [<c01451b7>] exit_files+0x47/0x60
        [<c0146a24>] do_exit+0x144/0x710
        [<c017b163>] ? lock_release_holdtime+0x33/0x210
        [<c0528137>] ? _spin_unlock_irq+0x27/0x30
        [<c0147028>] do_group_exit+0x38/0xa0
        [<c017babb>] ? trace_hardirqs_on+0xb/0x10
        [<c0159abc>] get_signal_to_deliver+0x2ac/0x410
        [<c0102849>] do_notify_resume+0xb9/0x890
        [<c0178fd0>] ? trace_hardirqs_off_caller+0x20/0xd0
        [<c017b163>] ? lock_release_holdtime+0x33/0x210
        [<c0165b50>] ? autoremove_wake_function+0x0/0x50
        [<c017ba54>] ? trace_hardirqs_on_caller+0x134/0x190
        [<c017babb>] ? trace_hardirqs_on+0xb/0x10
        [<c0300ba4>] ? security_file_permission+0x14/0x20
        [<c0215761>] ? vfs_write+0x131/0x190
        [<c0214f50>] ? do_sync_write+0x0/0x120
        [<c0103115>] ? sysenter_do_call+0x27/0x32
        [<c01032d2>] work_notifysig+0x13/0x21
      
      CC: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      d21cd8f1
    • Jan Kara's avatar
      quota: Fix 64-bit limits setting on 32-bit archs · 82fdfa92
      Jan Kara authored
      Fix warnings:
      fs/quota/quota_v2.c: In function ‘v2_read_file_info’:
      fs/quota/quota_v2.c:123: warning: integer constant is too large for ‘long’ type
      fs/quota/quota_v2.c:124: warning: integer constant is too large for ‘long’ type
      Reported-by: default avatarJerry Leo <jerryleo860202@gmail.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      82fdfa92
    • Eric Sandeen's avatar
      ext3: Replace lock/unlock_super() with an explicit lock for resizing · 96d2a495
      Eric Sandeen authored
      Use a separate lock to protect s_groups_count and the other block
      group descriptors which get changed via an on-line resize operation,
      so we can stop overloading the use of lock_super().
      
      Port of ext4 commit 32ed5058 by
      Theodore Ts'o <tytso@mit.edu>.
      
      CC: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      96d2a495
    • Eric Sandeen's avatar
      ext3: Replace lock/unlock_super() with an explicit lock for the orphan list · b8a052d0
      Eric Sandeen authored
      Use a separate lock to protect the orphan list, so we can stop
      overloading the use of lock_super().
      
      Port of ext4 commit 3b9d4ed2
      by Theodore Ts'o <tytso@mit.edu>.
      
      CC: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      b8a052d0
    • Eric Sandeen's avatar
      ext3: ext3_mark_recovery_complete() doesn't need to use lock_super · 4854a5f0
      Eric Sandeen authored
      The function ext3_mark_recovery_complete() is called from two call
      paths: either (a) while mounting the filesystem, in which case there's
      no danger of any other CPU calling write_super() until the mount is
      completed, and (b) while remounting the filesystem read-write, in
      which case the fs core has already locked the superblock.  This also
      allows us to take out a very vile unlock_super()/lock_super() pair in
      ext3_remount().
      
      Port of ext4 commit a63c9eb2 by
      Theodore Ts'o <tytso@mit.edu>.
      
      CC: Theodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      4854a5f0