From: Kari Argillander <kari.argillander@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
ntfs3@lists.linux.dev, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fs/ntfs3: Delete dead code in ni_write_frame()
Date: Fri, 27 Aug 2021 13:14:55 +0300 [thread overview]
Message-ID: <20210827101455.6sdbvsdpzhmcvtiu@kari-VirtualBox> (raw)
In-Reply-To: <20210827100528.GC9449@kili>
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@oracle.com>
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
> ---
> 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
>
>
prev parent reply other threads:[~2021-08-27 10:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 10:05 [PATCH] fs/ntfs3: Delete dead code in ni_write_frame() Dan Carpenter
2021-08-27 10:14 ` Kari Argillander [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210827101455.6sdbvsdpzhmcvtiu@kari-VirtualBox \
--to=kari.argillander@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).