Re: [PATCH, take 1] Linear-time/space rename logic (exact renames only)

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

 



On Sun, Oct 21, 2007 at 04:59:03PM -0700, Linus Torvalds wrote:
> +static int find_same_files(void *ptr)
> +{
> +	struct file_similarity *p = ptr;
> +	struct file_similarity *src = NULL, *dst = NULL;
> +
> +	/* Split the hash list up into sources and destinations */
> +	do {
> +		struct file_similarity *entry = p;
> +		p = p->next;
> +		if (entry->src_dst < 0) {
> +			entry->next = src;
> +			src = entry;
> +		} else {
> +			entry->next = dst;
> +			dst = entry;
> +		}
> +	} while (p);

Aren't you truncating the ptr list after the first entry here?
(While you still need the whole list in free_file_table.)

skimo
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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