Re: [RFC 05/10] fs/dax: Refactor wait for dax idle page

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

 



John Hubbard <jhubbard@xxxxxxxxxx> writes:

> On 4/10/24 5:57 PM, Alistair Popple wrote:
> ...
>> diff --git a/include/linux/dax.h b/include/linux/dax.h
>> index 22cd990..bced4d4 100644
>> --- a/include/linux/dax.h
>> +++ b/include/linux/dax.h
>> @@ -212,6 +212,17 @@ int dax_zero_range(struct inode *inode, loff_t pos, loff_t len, bool *did_zero,
>>   int dax_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
>>   		const struct iomap_ops *ops);
>>   +static inline int dax_wait_page_idle(struct page *page,
>> +				void (cb)(struct inode *),
>> +				struct inode *inode)
>> +{
>> +	int ret;
>> +
>> +	ret = ___wait_var_event(page, page_ref_count(page) == 1,
>> +				TASK_INTERRUPTIBLE, 0, 0, cb(inode));
>> +	return ret;
>> +}
>
> Or just:
> {
> 	return ___wait_var_event(page, page_ref_count(page) == 1,
> 			TASK_INTERRUPTIBLE, 0, 0, cb(inode));
> }
>
> ...yes?

Yep. Thanks.

> thanks,





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux