Re: [PATCH v5] mru: Replace mru.[ch] with list.h implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gargi Sharma <gs051095@xxxxxxxxx> wrote:
>  7 files changed, 15 insertions(+), 86 deletions(-)

Thanks! I like the code reduction and increased use of list.h

Were you able to finish running the test suite?  I wasn't :<

> -void mru_clear(struct mru *head)
> -{
> -	struct list_head *pos;
> -	struct list_head *tmp;
> -
> -	list_for_each_safe(pos, tmp, &head->list) {
> -		free(list_entry(pos, struct mru, list));
> -	}
> -	INIT_LIST_HEAD(&head->list);
> -}

OK, the free() calls are no longer necessary...

<snip>

> --- a/packfile.c
> +++ b/packfile.c
> @@ -859,9 +859,8 @@ static void prepare_packed_git_mru(void)
>  {
>  	struct packed_git *p;
>  
> -	mru_clear(&packed_git_mru);

But the removed mru_clear needs to be replaced with:

+	INIT_LIST_HEAD(&packed_git_mru);

Otherwise, t3050 never finishes for me.

>  	for (p = packed_git; p; p = p->next)
> -		mru_append(&packed_git_mru, p);
> +		list_add_tail(&p->mru, &packed_git_mru);
>  }

Everything else looks good to me, I'm still waiting for the test
suite to run but I don't expect further problems.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux