Re: [RFC PATCH v3 16/18] iomap: Use balance_dirty_pages_ratelimited_flags in iomap_write_iter

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

 



> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -784,6 +784,7 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i)
>  	do {
>  		struct folio *folio;
>  		struct page *page;
> +		struct address_space *i_mapping = iter->inode->i_mapping;

We tend to call these variables just mapping without the i_ prefix.

>  again:
> +		if (iter->flags & IOMAP_NOWAIT) {
> +			status = balance_dirty_pages_ratelimited_async(i_mapping);

Which also nicely avoids the overly long line here.

> +			if (unlikely(status))
> +				break;
> +		} else {
> +			balance_dirty_pages_ratelimited(i_mapping);
> +		}

Then again directly calling the underlying helper here would be simpler
to start with.

	unsigned int bdp_flags = (iter->flags & IOMAP_NOWAIT) ? BDP_ASYNC : 0;

	...


		status = balance_dirty_pages_ratelimited_flags(mapping,
				bdp_flags);
		if (status)
			break;





[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