Commit 26f5c084 authored by wang di's avatar wang di Committed by Greg Kroah-Hartman

staging: lustre: llite: remove code never called

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: default avatarwang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f48c52c
...@@ -576,7 +576,7 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data, ...@@ -576,7 +576,7 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data,
*/ */
done = 1; done = 1;
ll_release_page(page, 0); ll_release_page(page, 0);
} else if (1 /* chain is exhausted*/) { } else {
/* /*
* Normal case: continue to the next * Normal case: continue to the next
* page. * page.
...@@ -587,13 +587,6 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data, ...@@ -587,13 +587,6 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data,
next = pos; next = pos;
page = ll_get_dir_page(inode, pos, page = ll_get_dir_page(inode, pos,
&chain); &chain);
} else {
/*
* go into overflow page.
*/
LASSERT(le32_to_cpu(dp->ldp_flags) &
LDF_COLLIDE);
ll_release_page(page, 1);
} }
} }
......
...@@ -1224,7 +1224,7 @@ static int ll_statahead_thread(void *arg) ...@@ -1224,7 +1224,7 @@ static int ll_statahead_thread(void *arg)
rc = 0; rc = 0;
goto out; goto out;
} else if (1) { } else {
/* /*
* chain is exhausted. * chain is exhausted.
* Normal case: continue to the next page. * Normal case: continue to the next page.
...@@ -1232,12 +1232,6 @@ static int ll_statahead_thread(void *arg) ...@@ -1232,12 +1232,6 @@ static int ll_statahead_thread(void *arg)
ll_release_page(page, le32_to_cpu(dp->ldp_flags) & ll_release_page(page, le32_to_cpu(dp->ldp_flags) &
LDF_COLLIDE); LDF_COLLIDE);
page = ll_get_dir_page(dir, pos, &chain); 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.
*/
} }
} }
...@@ -1434,8 +1428,8 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry) ...@@ -1434,8 +1428,8 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
* End of directory reached. * End of directory reached.
*/ */
ll_release_page(page, 0); ll_release_page(page, 0);
break; goto out;
} else if (1) { } else {
/* /*
* chain is exhausted * chain is exhausted
* Normal case: continue to the next page. * Normal case: continue to the next page.
...@@ -1443,12 +1437,6 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry) ...@@ -1443,12 +1437,6 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
ll_release_page(page, le32_to_cpu(dp->ldp_flags) & ll_release_page(page, le32_to_cpu(dp->ldp_flags) &
LDF_COLLIDE); LDF_COLLIDE);
page = ll_get_dir_page(dir, pos, &chain); 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);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment