diff options
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index ddd45e5b9383..2251a49f3e17 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -177,6 +177,7 @@ xfs_growfs_data_private( | |||
177 | up_write(&mp->m_peraglock); | 177 | up_write(&mp->m_peraglock); |
178 | } | 178 | } |
179 | tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); | 179 | tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); |
180 | tp->t_flags |= XFS_TRANS_RESERVE; | ||
180 | if ((error = xfs_trans_reserve(tp, XFS_GROWFS_SPACE_RES(mp), | 181 | if ((error = xfs_trans_reserve(tp, XFS_GROWFS_SPACE_RES(mp), |
181 | XFS_GROWDATA_LOG_RES(mp), 0, 0, 0))) { | 182 | XFS_GROWDATA_LOG_RES(mp), 0, 0, 0))) { |
182 | xfs_trans_cancel(tp, 0); | 183 | xfs_trans_cancel(tp, 0); |
@@ -499,8 +500,9 @@ xfs_reserve_blocks( | |||
499 | unsigned long s; | 500 | unsigned long s; |
500 | 501 | ||
501 | /* If inval is null, report current values and return */ | 502 | /* If inval is null, report current values and return */ |
502 | |||
503 | if (inval == (__uint64_t *)NULL) { | 503 | if (inval == (__uint64_t *)NULL) { |
504 | if (!outval) | ||
505 | return EINVAL; | ||
504 | outval->resblks = mp->m_resblks; | 506 | outval->resblks = mp->m_resblks; |
505 | outval->resblks_avail = mp->m_resblks_avail; | 507 | outval->resblks_avail = mp->m_resblks_avail; |
506 | return 0; | 508 | return 0; |
@@ -563,8 +565,10 @@ retry: | |||
563 | } | 565 | } |
564 | } | 566 | } |
565 | out: | 567 | out: |
566 | outval->resblks = mp->m_resblks; | 568 | if (outval) { |
567 | outval->resblks_avail = mp->m_resblks_avail; | 569 | outval->resblks = mp->m_resblks; |
570 | outval->resblks_avail = mp->m_resblks_avail; | ||
571 | } | ||
568 | XFS_SB_UNLOCK(mp, s); | 572 | XFS_SB_UNLOCK(mp, s); |
569 | 573 | ||
570 | if (fdblks_delta) { | 574 | if (fdblks_delta) { |