lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Jun 2021 11:46:28 +0200
From:   Christoph Hellwig <hch@...radead.org>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 34/46] mm/filemap: Add i_blocks_per_folio()

On Tue, Jun 22, 2021 at 01:15:39PM +0100, Matthew Wilcox (Oracle) wrote:
> Reimplement i_blocks_per_page() as a wrapper around i_blocks_per_folio().
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> ---
>  include/linux/pagemap.h | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 31edfa891987..c30db827b65d 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -1149,19 +1149,25 @@ static inline int page_mkwrite_check_truncate(struct page *page,
>  }
>  
>  /**
> - * i_blocks_per_page - How many blocks fit in this page.
> + * i_blocks_per_folio - How many blocks fit in this folio.
>   * @inode: The inode which contains the blocks.
> - * @page: The page (head page if the page is a THP).
> + * @folio: The folio.
>   *
> - * If the block size is larger than the size of this page, return zero.
> + * If the block size is larger than the size of this folio, return zero.
>   *
> - * Context: The caller should hold a refcount on the page to prevent it
> + * Context: The caller should hold a refcount on the folio to prevent it
>   * from being split.
> - * Return: The number of filesystem blocks covered by this page.
> + * Return: The number of filesystem blocks covered by this folio.
>   */
> +static inline
> +unsigned int i_blocks_per_folio(struct inode *inode, struct folio *folio)

Weirdo formatting (same as i_blocks_per_page, but I'd still rather avoid
it).

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ