]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Jun 2009 16:47:21 +0000 (09:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Jun 2009 16:47:21 +0000 (09:47 -0700)
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: prevent deadlock in xfs_qm_shake()
  xfs: fix overflow in xfs_growfs_data_private
  xfs: fix double unlock in xfs_swap_extents()

fs/xfs/linux-2.6/kmem.h
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_fsops.c

index af6843c7ee4bb165f6345d3553ef145af97ae208..179cbd630f692f6c0220112d6ba01cda65ef67d9 100644 (file)
@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
 static inline int
 kmem_shake_allow(gfp_t gfp_mask)
 {
-       return (gfp_mask & __GFP_WAIT) != 0;
+       return ((gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS));
 }
 
 #endif /* __XFS_SUPPORT_KMEM_H__ */
index e6d839bddbf008b3bc522720e5f5e0711a954e10..7465f9ee125fcc2b80194043e9c141799a05ffde 100644 (file)
@@ -347,13 +347,15 @@ xfs_swap_extents(
 
        error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
 
-out_unlock:
-       xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
-       xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 out:
        kmem_free(tempifp);
        return error;
 
+out_unlock:
+       xfs_iunlock(ip,  XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
+       goto out;
+
 out_trans_cancel:
        xfs_trans_cancel(tp, 0);
        goto out_unlock;
index 8379e3bca26cb08d865a8c4cda3c7f6f1c48c276..cbd451bb4848b38e398e583ba9537540bbfce1d0 100644 (file)
@@ -160,7 +160,7 @@ xfs_growfs_data_private(
        nagcount = new + (nb_mod != 0);
        if (nb_mod && nb_mod < XFS_MIN_AG_BLOCKS) {
                nagcount--;
-               nb = nagcount * mp->m_sb.sb_agblocks;
+               nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks;
                if (nb < mp->m_sb.sb_dblocks)
                        return XFS_ERROR(EINVAL);
        }