Re: [RFC PATCH v3 01/14] mm: add bdi_set_strict_limit() function

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

 



Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

> On Mon, 24 Oct 2022 12:05:50 -0700 Stefan Roesch <shr@xxxxxxxxxxxx> wrote:
>
>> This adds the bdi_set_strict_limit function to be able to set/unset the
>> BDI_CAP_STRICTLIMIT flag.
>>
>> ...
>>
>> --- a/mm/page-writeback.c
>> +++ b/mm/page-writeback.c
>> @@ -698,6 +698,22 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned max_ratio)
>>  }
>>  EXPORT_SYMBOL(bdi_set_max_ratio);
>>
>> +int bdi_set_strict_limit(struct backing_dev_info *bdi, unsigned int strict_limit)
>> +{
>> +	if (strict_limit > 1)
>> +		return -EINVAL;
>> +
>> +	spin_lock_bh(&bdi_lock);
>> +	if (strict_limit)
>> +		bdi->capabilities |= BDI_CAP_STRICTLIMIT;
>> +	else
>> +		bdi->capabilities &= ~BDI_CAP_STRICTLIMIT;
>> +	spin_unlock_bh(&bdi_lock);
>> +
>> +	return 0;
>> +}
>> +EXPORT_SYMBOL_GPL(bdi_set_strict_limit);
>
> I don't believe the export is needed?

No, the export is not needed, the next version will remove the export.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux