Re: [PATCH 4/8] reiserfs: Convert reiserfs_delete_item() to use kmap_local_folio()

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

 



On Fri, Dec 16, 2022 at 08:53:43PM +0000, Matthew Wilcox (Oracle) wrote:
> kmap_atomic() is deprecated, and so is bh->b_page.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>

> ---
>  fs/reiserfs/stree.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
> index 84c12a1947b2..309c61bd90e0 100644
> --- a/fs/reiserfs/stree.c
> +++ b/fs/reiserfs/stree.c
> @@ -1359,12 +1359,13 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
>  		 * -clm
>  		 */
>  
> -		data = kmap_atomic(un_bh->b_page);
> -		off = ((le_ih_k_offset(&s_ih) - 1) & (PAGE_SIZE - 1));
> -		memcpy(data + off,
> +		off = offset_in_folio(un_bh->b_folio,
> +					le_ih_k_offset(&s_ih) - 1);
> +		data = kmap_local_folio(un_bh->b_folio, off);
> +		memcpy(data,
>  		       ih_item_body(PATH_PLAST_BUFFER(path), &s_ih),
>  		       ret_value);
> -		kunmap_atomic(data);
> +		kunmap_local(data);
>  	}
>  
>  	/* Perform balancing after all resources have been collected at once. */
> -- 
> 2.35.1
> 



[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux