Re: [PATCH v4 01/10] ref-filter: add option to align atoms to the left

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

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:

> -	if (!ref->value) {
> -		populate_value(ref);
> +	/*
> +	 * If the atom is a pseudo_atom then we re-populate the value
> +	 * into the ref_formatting_state stucture.
> +	 */
> +	if (!ref->value || ref->value[atom].pseudo_atom) {
> +		populate_value(state, ref);
>  		fill_missing_values(ref->value);

I am not sure why you need to do this.  populate_value() and
fill_missing_values() are fairly heavy-weight operations that are
expected to grab everything necessary from scratch, and that is why
we ensure that we do not call them more than once for each "ref"
with by guarding the calls with "if (!ref->value)".

This change is breaking that basic arrangement, and worse yet, it
forces us re-read everything about that ref, leaking old ref->value.

Why could this be a good idea?
--
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]