diff options
author | 2020-05-01 16:00:50 -0700 | |
---|---|---|
committer | 2020-05-08 08:49:59 -0700 | |
commit | 2565a11b224b68a222838d09623c6a398c4d5f6c (patch) | |
tree | 62e6ee42388cc44d5ed4f590d37395e79ebb63b7 /fs/xfs/xfs_log_recover.c | |
parent | xfs: refactor log recovery BUI item dispatch for pass2 commit functions (diff) | |
download | linux-2565a11b224b68a222838d09623c6a398c4d5f6c.tar.gz linux-2565a11b224b68a222838d09623c6a398c4d5f6c.tar.bz2 linux-2565a11b224b68a222838d09623c6a398c4d5f6c.zip |
xfs: remove log recovery quotaoff item dispatch for pass2 commit functions
Quotaoff doesn't actually do anything, so take advantage of the
commit_pass2 pointer being optional and get rid of the switch
statement clause.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 1ed0bdabb9a4..02148e341760 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2035,31 +2035,6 @@ xlog_buf_readahead( } STATIC int -xlog_recover_commit_pass2( - struct xlog *log, - struct xlog_recover *trans, - struct list_head *buffer_list, - struct xlog_recover_item *item) -{ - trace_xfs_log_recover_item_recover(log, trans, item, XLOG_RECOVER_PASS2); - - if (item->ri_ops->commit_pass2) - return item->ri_ops->commit_pass2(log, buffer_list, item, - trans->r_lsn); - - switch (ITEM_TYPE(item)) { - case XFS_LI_QUOTAOFF: - /* nothing to do in pass2 */ - return 0; - default: - xfs_warn(log->l_mp, "%s: invalid item type (%d)", - __func__, ITEM_TYPE(item)); - ASSERT(0); - return -EFSCORRUPTED; - } -} - -STATIC int xlog_recover_items_pass2( struct xlog *log, struct xlog_recover *trans, @@ -2070,8 +2045,12 @@ xlog_recover_items_pass2( int error = 0; list_for_each_entry(item, item_list, ri_list) { - error = xlog_recover_commit_pass2(log, trans, - buffer_list, item); + trace_xfs_log_recover_item_recover(log, trans, item, + XLOG_RECOVER_PASS2); + + if (item->ri_ops->commit_pass2) + error = item->ri_ops->commit_pass2(log, buffer_list, + item, trans->r_lsn); if (error) return error; } |