1. 11 Nov, 2012 4 commits
  2. 09 Nov, 2012 31 commits
  3. 07 Nov, 2012 5 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes · 0e4a43ed
      Linus Torvalds authored
      Pull gfs2 fixes from Steven Whitehouse:
       "Here are a number of GFS2 bug fixes.  There are three from Andy Price
        which fix various issues spotted by automated code analysis.  There
        are two from Lukas Czerner fixing my mistaken assumptions as to how
        FITRIM should work.  Finally Ben Marzinski has fixed a bug relating to
        mmap and atime and also a bug relating to a locking issue in the
        transaction code."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
        GFS2: Test bufdata with buffer locked and gfs2_log_lock held
        GFS2: Don't call file_accessed() with a shared glock
        GFS2: Fix FITRIM argument handling
        GFS2: Require user to provide argument for FITRIM
        GFS2: Clean up some unused assignments
        GFS2: Fix possible null pointer deref in gfs2_rs_alloc
        GFS2: Fix an unchecked error from gfs2_rs_alloc
      0e4a43ed
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 826389d1
      Linus Torvalds authored
      Pull hwmon fixes from Jean Delvare.
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: Fix chip feature table headers
        hwmon: (w83627ehf) Force initial bank selection
      826389d1
    • Benjamin Marzinski's avatar
      GFS2: Test bufdata with buffer locked and gfs2_log_lock held · 96e5d1d3
      Benjamin Marzinski authored
      In gfs2_trans_add_bh(), gfs2 was testing if a there was a bd attached to the
      buffer without having the gfs2_log_lock held. It was then assuming it would
      stay attached for the rest of the function. However, without either the log
      lock being held of the buffer locked, __gfs2_ail_flush() could detach bd at any
      time.  This patch moves the locking before the test.  If there isn't a bd
      already attached, gfs2 can safely allocate one and attach it before locking.
      There is no way that the newly allocated bd could be on the ail list,
      and thus no way for __gfs2_ail_flush() to detach it.
      Signed-off-by: default avatarBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      96e5d1d3
    • Benjamin Marzinski's avatar
      GFS2: Don't call file_accessed() with a shared glock · 3d162688
      Benjamin Marzinski authored
      file_accessed() was being called by gfs2_mmap() with a shared glock. If it
      needed to update the atime, it was crashing because it dirtied the inode in
      gfs2_dirty_inode() without holding an exclusive lock. gfs2_dirty_inode()
      checked if the caller was already holding a glock, but it didn't make sure that
      the glock was in the exclusive state. Now, instead of calling file_accessed()
      while holding the shared lock in gfs2_mmap(), file_accessed() is called after
      grabbing and releasing the glock to update the inode.  If file_accessed() needs
      to update the atime, it will grab an exclusive lock in gfs2_dirty_inode().
      
      gfs2_dirty_inode() now also checks to make sure that if the calling process has
      already locked the glock, it has an exclusive lock.
      Signed-off-by: default avatarBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      3d162688
    • Lukas Czerner's avatar
      GFS2: Fix FITRIM argument handling · 076f0faa
      Lukas Czerner authored
      Currently implementation in gfs2 uses FITRIM arguments as it were in
      file system blocks units which is wrong. The FITRIM arguments
      (fstrim_range.start, fstrim_range.len and fstrim_range.minlen) are
      actually in bytes.
      
      Moreover, check for start argument beyond the end of file system, len
      argument being smaller than file system block and minlen argument being
      bigger than biggest resource group were missing.
      
      This commit converts the code to convert FITRIM argument to file system
      blocks and also adds appropriate checks mentioned above.
      
      All the problems were recognised by xfstests 251 and 260.
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      076f0faa