From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752326AbcGVDJ4 (ORCPT ); Thu, 21 Jul 2016 23:09:56 -0400 Received: from [160.91.203.10] ([160.91.203.10]:48783 "EHLO smtp1.ccs.ornl.gov" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751378AbcGVDJy (ORCPT ); Thu, 21 Jul 2016 23:09:54 -0400 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , wang di , James Simmons Subject: [PATCH 16/58] staging: lustre: llite: remove code never called Date: Thu, 21 Jul 2016 22:44:09 -0400 Message-Id: <1469155491-15265-17-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1469155491-15265-1-git-send-email-jsimmons@infradead.org> References: <1469155491-15265-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: wang di We have if (1) conditionals which is pointless so remove it and the next code block is never called so remove that as well. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/7043 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-by: John L. Hammond Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/dir.c | 9 +-------- drivers/staging/lustre/lustre/llite/statahead.c | 18 +++--------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 907fae4..2307e70 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -576,7 +576,7 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data, */ done = 1; ll_release_page(page, 0); - } else if (1 /* chain is exhausted*/) { + } else { /* * Normal case: continue to the next * page. @@ -587,13 +587,6 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data, next = pos; page = ll_get_dir_page(inode, pos, &chain); - } else { - /* - * go into overflow page. - */ - LASSERT(le32_to_cpu(dp->ldp_flags) & - LDF_COLLIDE); - ll_release_page(page, 1); } } diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index fc24a65..e4ca525 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -1222,7 +1222,7 @@ do_it: rc = 0; goto out; - } else if (1) { + } else { /* * chain is exhausted. * Normal case: continue to the next page. @@ -1230,12 +1230,6 @@ do_it: ll_release_page(page, le32_to_cpu(dp->ldp_flags) & LDF_COLLIDE); page = ll_get_dir_page(dir, pos, &chain); - } else { - LASSERT(le32_to_cpu(dp->ldp_flags) & LDF_COLLIDE); - ll_release_page(page, 1); - /* - * go into overflow page. - */ } } @@ -1432,8 +1426,8 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry) * End of directory reached. */ ll_release_page(page, 0); - break; - } else if (1) { + goto out; + } else { /* * chain is exhausted * Normal case: continue to the next page. @@ -1441,12 +1435,6 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry) ll_release_page(page, le32_to_cpu(dp->ldp_flags) & LDF_COLLIDE); page = ll_get_dir_page(dir, pos, &chain); - } else { - /* - * go into overflow page. - */ - LASSERT(le32_to_cpu(dp->ldp_flags) & LDF_COLLIDE); - ll_release_page(page, 1); } } -- 1.7.1