Commit 77a782ab authored by wang di's avatar wang di Committed by Greg Kroah-Hartman

staging: lustre: llite: change remove parameter to bool

Change the 3rd parameter remove to a bool for ll_release_page
function.
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 006e4dcd
...@@ -236,7 +236,7 @@ static int ll_dir_filler(void *_hash, struct page *page0) ...@@ -236,7 +236,7 @@ static int ll_dir_filler(void *_hash, struct page *page0)
return rc; return rc;
} }
void ll_release_page(struct inode *inode, struct page *page, int remove) void ll_release_page(struct inode *inode, struct page *page, bool remove)
{ {
kunmap(page); kunmap(page);
if (remove) { if (remove) {
...@@ -297,7 +297,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash, ...@@ -297,7 +297,7 @@ static struct page *ll_dir_page_locate(struct inode *dir, __u64 *hash,
CDEBUG(D_VFSTRACE, "page %lu [%llu %llu], hash %llu\n", CDEBUG(D_VFSTRACE, "page %lu [%llu %llu], hash %llu\n",
offset, *start, *end, *hash); offset, *start, *end, *hash);
if (*hash > *end) { if (*hash > *end) {
ll_release_page(dir, page, 0); ll_release_page(dir, page, false);
page = NULL; page = NULL;
} else if (*end != *start && *hash == *end) { } else if (*end != *start && *hash == *end) {
/* /*
...@@ -463,7 +463,7 @@ struct page *ll_get_dir_page(struct inode *dir, struct md_op_data *op_data, ...@@ -463,7 +463,7 @@ struct page *ll_get_dir_page(struct inode *dir, struct md_op_data *op_data,
return page; return page;
fail: fail:
ll_release_page(dir, page, 1); ll_release_page(dir, page, true);
page = ERR_PTR(-EIO); page = ERR_PTR(-EIO);
goto out_unlock; goto out_unlock;
} }
...@@ -561,7 +561,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data, ...@@ -561,7 +561,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data,
if (done) { if (done) {
pos = hash; pos = hash;
ll_release_page(inode, page, 0); ll_release_page(inode, page, false);
break; break;
} }
...@@ -572,7 +572,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data, ...@@ -572,7 +572,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data,
* End of directory reached. * End of directory reached.
*/ */
done = 1; done = 1;
ll_release_page(inode, page, 0); ll_release_page(inode, page, false);
} else { } else {
/* /*
* Normal case: continue to the next * Normal case: continue to the next
......
...@@ -655,7 +655,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data, ...@@ -655,7 +655,7 @@ int ll_dir_read(struct inode *inode, __u64 *ppos, struct md_op_data *op_data,
int ll_get_mdt_idx(struct inode *inode); int ll_get_mdt_idx(struct inode *inode);
struct page *ll_get_dir_page(struct inode *dir, struct md_op_data *op_data, struct page *ll_get_dir_page(struct inode *dir, struct md_op_data *op_data,
__u64 hash, struct ll_dir_chain *chain); __u64 hash, struct ll_dir_chain *chain);
void ll_release_page(struct inode *inode, struct page *page, int remove); void ll_release_page(struct inode *inode, struct page *page, bool remove);
/* llite/namei.c */ /* llite/namei.c */
extern const struct inode_operations ll_special_inode_operations; extern const struct inode_operations ll_special_inode_operations;
......
...@@ -1142,7 +1142,7 @@ static int ll_statahead_thread(void *arg) ...@@ -1142,7 +1142,7 @@ static int ll_statahead_thread(void *arg)
ll_post_statahead(sai); ll_post_statahead(sai);
if (unlikely(!thread_is_running(thread))) { if (unlikely(!thread_is_running(thread))) {
ll_release_page(dir, page, 0); ll_release_page(dir, page, false);
rc = 0; rc = 0;
goto out; goto out;
} }
...@@ -1166,7 +1166,7 @@ static int ll_statahead_thread(void *arg) ...@@ -1166,7 +1166,7 @@ static int ll_statahead_thread(void *arg)
if (unlikely( if (unlikely(
!thread_is_running(thread))) { !thread_is_running(thread))) {
ll_release_page(dir, page, 0); ll_release_page(dir, page, false);
rc = 0; rc = 0;
goto out; goto out;
} }
...@@ -1189,7 +1189,7 @@ static int ll_statahead_thread(void *arg) ...@@ -1189,7 +1189,7 @@ static int ll_statahead_thread(void *arg)
/* /*
* End of directory reached. * End of directory reached.
*/ */
ll_release_page(dir, page, 0); ll_release_page(dir, page, false);
while (1) { while (1) {
l_wait_event(thread->t_ctl_waitq, l_wait_event(thread->t_ctl_waitq,
!list_empty(&sai->sai_entries_received) || !list_empty(&sai->sai_entries_received) ||
...@@ -1428,7 +1428,7 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry) ...@@ -1428,7 +1428,7 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
else else
rc = LS_FIRST_DOT_DE; rc = LS_FIRST_DOT_DE;
ll_release_page(dir, page, 0); ll_release_page(dir, page, false);
goto out; goto out;
} }
pos = le64_to_cpu(dp->ldp_hash_end); pos = le64_to_cpu(dp->ldp_hash_end);
...@@ -1436,7 +1436,7 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry) ...@@ -1436,7 +1436,7 @@ static int is_first_dirent(struct inode *dir, struct dentry *dentry)
/* /*
* End of directory reached. * End of directory reached.
*/ */
ll_release_page(dir, page, 0); ll_release_page(dir, page, false);
goto out; goto out;
} else { } else {
/* /*
......
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