All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 4/5] xfs: convert AIL cursors to use struct list_head
Date: Mon, 4 Jul 2011 04:43:16 -0400	[thread overview]
Message-ID: <20110704084316.GA5907@infradead.org> (raw)
In-Reply-To: <1309757260-5484-5-git-send-email-david@fromorbit.com>

On Mon, Jul 04, 2011 at 03:27:39PM +1000, Dave Chinner wrote:
>  /*
>   * AIL traversal cursor initialisation.
>   *
> + * The cursor keeps track of where our current traversal is up to by tracking
> + * the next ??tem in the list for us. However, for this to be safe, removing an
               ^^
Non-ASCSI character.

> + * object from the AIL needs to invalidate any cursor that points to it. hence
> + * the traversal cursor needs to be linked to the struct xfs_ail so that
> + * deletion can search all the active cursors for invalidation.
>   */
>  STATIC void
>  xfs_trans_ail_cursor_init(
> @@ -181,17 +177,13 @@ xfs_trans_ail_cursor_init(
>  	struct xfs_ail_cursor	*cur)
>  {
>  	cur->item = NULL;
> -	if (cur == &ailp->xa_cursors)
> -		return;
> -
> -	cur->next = ailp->xa_cursors.next;
> -	ailp->xa_cursors.next = cur;
> +	INIT_LIST_HEAD(&cur->list);
> +	list_add_tail(&cur->list, &ailp->xa_cursors);
>  }

There is no need to initialize a list_head before adding it to a list.

Otherwise looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-07-04  8:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04  5:27 [PATCH 0/5] xfs: fix AIL bulk insert issues and cleanups Dave Chinner
2011-07-04  5:27 ` [PATCH 1/5] xfs: unpin stale inodes directly in IOP_COMMITTED Dave Chinner
2011-07-04  8:13   ` Christoph Hellwig
2011-07-06 20:45   ` Alex Elder
2011-07-04  5:27 ` [PATCH 2/5] xfs: use a cursor for bulk AIL insertion Dave Chinner
2011-07-04  8:32   ` Christoph Hellwig
2011-07-04 11:16   ` Christoph Hellwig
2011-07-04 21:20   ` Christoph Hellwig
2011-07-07 21:26     ` Alex Elder
2011-07-08  1:04       ` Dave Chinner
2011-07-07 20:29   ` Alex Elder
2011-07-04  5:27 ` [PATCH 3/5] xfs: remove confusing ail cursor wrapper Dave Chinner
2011-07-04  8:16   ` Christoph Hellwig
2011-07-07 20:33   ` Alex Elder
2011-07-04  5:27 ` [PATCH 4/5] xfs: convert AIL cursors to use struct list_head Dave Chinner
2011-07-04  8:43   ` Christoph Hellwig [this message]
2011-07-07 21:15   ` Alex Elder
2011-07-08  1:54     ` Dave Chinner
2011-07-04  5:27 ` [PATCH 5/5] xfs: add size update tracepoint to IO completion Dave Chinner
2011-07-04  8:16   ` Christoph Hellwig
2011-07-07 21:18   ` Alex Elder
2011-07-04  8:13 ` [PATCH 0/5] xfs: fix AIL bulk insert issues and cleanups Christoph Hellwig
2011-07-04 11:26   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110704084316.GA5907@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.