From: Dan Carpenter <dan.carpenter@oracle.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev, kernel-janitors@vger.kernel.org
Subject: [PATCH] fs/ntfs3: Delete dead code in ni_write_frame()
Date: Fri, 27 Aug 2021 13:05:29 +0300 [thread overview]
Message-ID: <20210827100528.GC9449@kili> (raw)
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>
---
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
next reply other threads:[~2021-08-27 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 10:05 Dan Carpenter [this message]
2021-08-27 10:14 ` [PATCH] fs/ntfs3: Delete dead code in ni_write_frame() Kari Argillander
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=20210827100528.GC9449@kili \
--to=dan.carpenter@oracle.com \
--cc=almaz.alexandrovich@paragon-software.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.