Re: [PATCH] fs/ntfs3: Delete dead code in ni_write_frame()

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

 



On Fri, Aug 27, 2021 at 01:05:29PM +0300, Dan Carpenter wrote:
> This code sets "lznt" to NULL and then kfrees it.  Kfreeing a NULL is a
> no-op so delete the code.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Reviewed-by: Kari Argillander <kari.argillander@xxxxxxxxx>

> ---
>  fs/ntfs3/frecord.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
> index c3121bf9c62f..c1a9f124f771 100644
> --- a/fs/ntfs3/frecord.c
> +++ b/fs/ntfs3/frecord.c
> @@ -2742,7 +2742,6 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
>  	}
>  
>  	mutex_lock(&sbi->compress.mtx_lznt);
> -	lznt = NULL;
>  	if (!sbi->compress.lznt) {
>  		/*
>  		 * lznt implements two levels of compression:
> @@ -2758,14 +2757,12 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
>  		}
>  
>  		sbi->compress.lznt = lznt;
> -		lznt = NULL;
>  	}
>  
>  	/* compress: frame_mem -> frame_ondisk */
>  	compr_size = compress_lznt(frame_mem, frame_size, frame_ondisk,
>  				   frame_size, sbi->compress.lznt);
>  	mutex_unlock(&sbi->compress.mtx_lznt);
> -	ntfs_free(lznt);
>  
>  	if (compr_size + sbi->cluster_size > frame_size) {
>  		/* frame is not compressed */
> -- 
> 2.20.1
> 
> 




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux