lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue,  6 Sep 2016 08:56:26 +0100
From:   Colin King <colin.king@...onical.com>
To:     Joern Engel <joern@...fs.org>,
        Prasad Joshi <prasadjoshi.linux@...il.com>, logfs@...fs.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] logfs: remove null check on block->alias_map as it is an array

From: Colin Ian King <colin.king@...onical.com>

block->alias_map is an array of unsigned longs and so the null
check on block->alias_map is unneccessary, so remove it.

Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 fs/logfs/readwrite.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index 3fb8c6d..9a7fea3 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -1279,9 +1279,8 @@ static void fill_shadow_tree(struct inode *inode, struct page *page,
 	struct shadow_tree *tree = &super->s_shadow_tree;
 
 	if (PagePrivate(page)) {
-		if (block->alias_map)
-			super->s_no_object_aliases -= bitmap_weight(
-					block->alias_map, LOGFS_BLOCK_FACTOR);
+		super->s_no_object_aliases -= bitmap_weight(
+			block->alias_map, LOGFS_BLOCK_FACTOR);
 		logfs_handle_transaction(inode, block->ta);
 		block->ops->free_block(inode->i_sb, block);
 	}
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ