diff options
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 432e82347ed6..c92d5b821029 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -136,7 +136,6 @@ xfs_growfs_data_private( | |||
136 | xfs_rfsblock_t nfree; | 136 | xfs_rfsblock_t nfree; |
137 | xfs_agnumber_t oagcount; | 137 | xfs_agnumber_t oagcount; |
138 | int pct; | 138 | int pct; |
139 | xfs_sb_t *sbp; | ||
140 | xfs_trans_t *tp; | 139 | xfs_trans_t *tp; |
141 | 140 | ||
142 | nb = in->newblocks; | 141 | nb = in->newblocks; |
@@ -175,7 +174,7 @@ xfs_growfs_data_private( | |||
175 | memset(&mp->m_perag[oagcount], 0, | 174 | memset(&mp->m_perag[oagcount], 0, |
176 | (nagcount - oagcount) * sizeof(xfs_perag_t)); | 175 | (nagcount - oagcount) * sizeof(xfs_perag_t)); |
177 | mp->m_flags |= XFS_MOUNT_32BITINODES; | 176 | mp->m_flags |= XFS_MOUNT_32BITINODES; |
178 | nagimax = xfs_initialize_perag(XFS_MTOVFS(mp), mp, nagcount); | 177 | nagimax = xfs_initialize_perag(mp, nagcount); |
179 | up_write(&mp->m_peraglock); | 178 | up_write(&mp->m_peraglock); |
180 | } | 179 | } |
181 | tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); | 180 | tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); |
@@ -377,8 +376,7 @@ xfs_growfs_data_private( | |||
377 | error, agno); | 376 | error, agno); |
378 | break; | 377 | break; |
379 | } | 378 | } |
380 | sbp = XFS_BUF_TO_SBP(bp); | 379 | xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb, XFS_SB_ALL_BITS); |
381 | xfs_xlatesb(sbp, &mp->m_sb, -1, XFS_SB_ALL_BITS); | ||
382 | /* | 380 | /* |
383 | * If we get an error writing out the alternate superblocks, | 381 | * If we get an error writing out the alternate superblocks, |
384 | * just issue a warning and continue. The real work is | 382 | * just issue a warning and continue. The real work is |
@@ -435,10 +433,10 @@ xfs_growfs_data( | |||
435 | xfs_growfs_data_t *in) | 433 | xfs_growfs_data_t *in) |
436 | { | 434 | { |
437 | int error; | 435 | int error; |
438 | if (!cpsema(&mp->m_growlock)) | 436 | if (!mutex_trylock(&mp->m_growlock)) |
439 | return XFS_ERROR(EWOULDBLOCK); | 437 | return XFS_ERROR(EWOULDBLOCK); |
440 | error = xfs_growfs_data_private(mp, in); | 438 | error = xfs_growfs_data_private(mp, in); |
441 | vsema(&mp->m_growlock); | 439 | mutex_unlock(&mp->m_growlock); |
442 | return error; | 440 | return error; |
443 | } | 441 | } |
444 | 442 | ||
@@ -448,10 +446,10 @@ xfs_growfs_log( | |||
448 | xfs_growfs_log_t *in) | 446 | xfs_growfs_log_t *in) |
449 | { | 447 | { |
450 | int error; | 448 | int error; |
451 | if (!cpsema(&mp->m_growlock)) | 449 | if (!mutex_trylock(&mp->m_growlock)) |
452 | return XFS_ERROR(EWOULDBLOCK); | 450 | return XFS_ERROR(EWOULDBLOCK); |
453 | error = xfs_growfs_log_private(mp, in); | 451 | error = xfs_growfs_log_private(mp, in); |
454 | vsema(&mp->m_growlock); | 452 | mutex_unlock(&mp->m_growlock); |
455 | return error; | 453 | return error; |
456 | } | 454 | } |
457 | 455 | ||
@@ -628,8 +626,7 @@ xfs_fs_goingdown( | |||
628 | { | 626 | { |
629 | switch (inflags) { | 627 | switch (inflags) { |
630 | case XFS_FSOP_GOING_FLAGS_DEFAULT: { | 628 | case XFS_FSOP_GOING_FLAGS_DEFAULT: { |
631 | struct bhv_vfs *vfsp = XFS_MTOVFS(mp); | 629 | struct super_block *sb = freeze_bdev(mp->m_super->s_bdev); |
632 | struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); | ||
633 | 630 | ||
634 | if (sb && !IS_ERR(sb)) { | 631 | if (sb && !IS_ERR(sb)) { |
635 | xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); | 632 | xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); |