YAMAMOTO Takashi wrote:
>> YAMAMOTO Takashi wrote:
+ lock_meta_page(page);
+ /*
+ * Check if somebody else beat us to allocating the meta_page
+ */
+ race_mp = page_get_meta_page(page);
+ if (race_mp) {
+ kfree(mp);
+ mp = race_mp;
>
> YAMAMOTO Takashi wrote:
> >> + lock_meta_page(page);
> >> + /*
> >> + * Check if somebody else beat us to allocating the meta_page
> >> + */
> >> + race_mp = page_get_meta_page(page);
> >> + if (race_mp) {
> >> + kfree(mp);
> >> + mp = race_mp;
> >> + atomic_inc
YAMAMOTO Takashi wrote:
>> +lock_meta_page(page);
>> +/*
>> + * Check if somebody else beat us to allocating the meta_page
>> + */
>> +race_mp = page_get_meta_page(page);
>> +if (race_mp) {
>> +kfree(mp);
>> +mp = race_mp;
>> +atomic_inc
> + lock_meta_page(page);
> + /*
> + * Check if somebody else beat us to allocating the meta_page
> + */
> + race_mp = page_get_meta_page(page);
> + if (race_mp) {
> + kfree(mp);
> + mp = race_mp;
> + atomic_inc(&mp->ref_cnt);
> +
Changelog for v3
1. Fix a probable leak with meta_page's (pointed out by Paul Menage)
2. Introduce a wrapper around mem_container_uncharge for uncharging pages
mem_container_uncharge_page()
Changelog
1. Improved error handling, uncharge on errors and check to see if we are
leaking pages (
5 matches
Mail list logo