fs/ntfs3: Delete dead code in ni_write_frame()
Subsystems (2)
PATCH 1/1 fs/ntfs3: Delete dead code in ni_write_frame()
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 <[email protected]>
--- fs/ntfs3/frecord.c | 3 --- 1 file changed, 3 deletions(-)
fs/ntfs3/frecord.c +0 -3
@@ -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 */
Signature · 1 line
2.20.1
Quoted 4 lines · Dan Carpenter
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 <[email protected]>
Reviewed-by Kari Argillander <[email protected]>
Quoted 35 lines
--- fs/ntfs3/frecord.c | 3 --- 1 file changed, 3 deletions(-)fs/ntfs3/frecord.c +0
-3@@ -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 */ Signature · 1 line
2.20.1