diff options
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index d1236d6f4045..b4d971b01588 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -501,7 +501,7 @@ xfs_reserve_blocks( | |||
501 | if (inval == (__uint64_t *)NULL) { | 501 | if (inval == (__uint64_t *)NULL) { |
502 | outval->resblks = mp->m_resblks; | 502 | outval->resblks = mp->m_resblks; |
503 | outval->resblks_avail = mp->m_resblks_avail; | 503 | outval->resblks_avail = mp->m_resblks_avail; |
504 | return(0); | 504 | return 0; |
505 | } | 505 | } |
506 | 506 | ||
507 | request = *inval; | 507 | request = *inval; |
@@ -537,7 +537,33 @@ xfs_reserve_blocks( | |||
537 | outval->resblks = mp->m_resblks; | 537 | outval->resblks = mp->m_resblks; |
538 | outval->resblks_avail = mp->m_resblks_avail; | 538 | outval->resblks_avail = mp->m_resblks_avail; |
539 | XFS_SB_UNLOCK(mp, s); | 539 | XFS_SB_UNLOCK(mp, s); |
540 | return(0); | 540 | return 0; |
541 | } | ||
542 | |||
543 | void | ||
544 | xfs_fs_log_dummy(xfs_mount_t *mp) | ||
545 | { | ||
546 | xfs_trans_t *tp; | ||
547 | xfs_inode_t *ip; | ||
548 | |||
549 | |||
550 | tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); | ||
551 | atomic_inc(&mp->m_active_trans); | ||
552 | if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) { | ||
553 | xfs_trans_cancel(tp, 0); | ||
554 | return; | ||
555 | } | ||
556 | |||
557 | ip = mp->m_rootip; | ||
558 | xfs_ilock(ip, XFS_ILOCK_EXCL); | ||
559 | |||
560 | xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); | ||
561 | xfs_trans_ihold(tp, ip); | ||
562 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | ||
563 | xfs_trans_set_sync(tp); | ||
564 | xfs_trans_commit(tp, 0, NULL); | ||
565 | |||
566 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | ||
541 | } | 567 | } |
542 | 568 | ||
543 | int | 569 | int |