]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_fsops.c
[XFS] Prevent deadlock when flushing inodes on unmount
[linux-2.6] / fs / xfs / xfs_fsops.c
index b599e6be9ec18f146f8527c7e361c5dc94f45c30..ddd45e5b9383d1163930b110cb7b9e926f5da3ae 100644 (file)
@@ -94,6 +94,8 @@ xfs_fs_geometry(
                                XFS_FSOP_GEOM_FLAGS_DIRV2 : 0) |
                        (XFS_SB_VERSION_HASSECTOR(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_SECTOR : 0) |
+                       (xfs_sb_version_haslazysbcount(&mp->m_sb) ?
+                               XFS_FSOP_GEOM_FLAGS_LAZYSB : 0) |
                        (XFS_SB_VERSION_HASATTR2(&mp->m_sb) ?
                                XFS_FSOP_GEOM_FLAGS_ATTR2 : 0);
                geo->logsectsize = XFS_SB_VERSION_HASSECTOR(&mp->m_sb) ?
@@ -140,6 +142,8 @@ xfs_growfs_data_private(
        pct = in->imaxpct;
        if (nb < mp->m_sb.sb_dblocks || pct < 0 || pct > 100)
                return XFS_ERROR(EINVAL);
+       if ((error = xfs_sb_validate_fsb_count(&mp->m_sb, nb)))
+               return error;
        dpct = pct - mp->m_sb.sb_imax_pct;
        error = xfs_read_buf(mp, mp->m_ddev_targp,
                        XFS_FSB_TO_BB(mp, nb) - XFS_FSS_TO_BB(mp, 1),
@@ -328,6 +332,7 @@ xfs_growfs_data_private(
                be32_add(&agf->agf_length, new);
                ASSERT(be32_to_cpu(agf->agf_length) ==
                       be32_to_cpu(agi->agi_length));
+               xfs_alloc_log_agf(tp, bp, XFS_AGF_LENGTH);
                /*
                 * Free the new space.
                 */