linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: Joern Engel <joern@logfs.org>,
	Prasad Joshi <prasadjoshi.linux@gmail.com>,
	logfs@logfs.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] logfs: remove null check on block->alias_map as it is an array
Date: Tue,  6 Sep 2016 08:56:26 +0100	[thread overview]
Message-ID: <20160906075626.28712-1-colin.king@canonical.com> (raw)

From: Colin Ian King <colin.king@canonical.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@canonical.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

                 reply	other threads:[~2016-09-06  7:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160906075626.28712-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=joern@logfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logfs@logfs.org \
    --cc=prasadjoshi.linux@gmail.com \
    /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).