| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/7] XFS: replace fixed size busy extent array with an rbtree |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Wed, 8 Oct 2008 14:49:28 -0400 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1223417377-8679-3-git-send-email-david@fromorbit.com> |
| References: | <1223417377-8679-1-git-send-email-david@fromorbit.com> <1223417377-8679-3-git-send-email-david@fromorbit.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.18 (2008-05-17) |
> @@ -131,14 +131,8 @@ STATIC void
> xfs_free_perag(
> xfs_mount_t *mp)
> {
> - if (mp->m_perag) {
> - int agno;
> -
> - for (agno = 0; agno < mp->m_maxagi; agno++)
> - if (mp->m_perag[agno].pagb_list)
> - kmem_free(mp->m_perag[agno].pagb_list);
> + if (mp->m_perag)
> kmem_free(mp->m_perag);
> - }
kmem_free(NULL) is fine, so no need for the if. And with that there's
no need for this one-line wrapper and we can just do the free in the
caller.
> typedef struct xfs_log_busy_slot {
> - xfs_agnumber_t lbc_ag;
> - ushort lbc_idx; /* index in perag.busy[] */
> + struct xfs_busy_extent *lbc_busyp;
> } xfs_log_busy_slot_t;
Just use xfs_busy_extent directly - there's only about a handful places
using xfs_log_busy_slot anyway.
> xfs_log_busy_slot_t *
> -xfs_trans_add_busy(xfs_trans_t *tp, xfs_agnumber_t ag, xfs_extlen_t idx)
> +xfs_trans_add_busy(
> + xfs_trans_t *tp,
> + struct xfs_busy_extent *busyp)
And this one can lose it's return value. It's always the second
argmument and ignored by all callers anyway.
|
| Previous by Date: | Re: [PATCH 1/7] XFS: rename xfs_get_perag, Christoph Hellwig |
|---|---|
| Next by Date: | xfsaild centisecs /proc wakeup control?, Linda A. Walsh |
| Previous by Thread: | [PATCH 2/7] XFS: replace fixed size busy extent array with an rbtree, Dave Chinner |
| Next by Thread: | Re: [PATCH 2/7] XFS: replace fixed size busy extent array with an rbtree, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |