Commit 53f1a127 authored by Shivani Bhardwaj's avatar Shivani Bhardwaj Committed by Greg Kroah-Hartman

staging: lustre: Remove cl_2queue_add wrapper

Remove the wrapper function cl_2queue_add() and replace all its calls in
different files with the function it wrapped. Also, comments are added
wherever necessary to make the working of function clear. Prototype of
the function is also removed from the header file as it is no longer
needed.
Signed-off-by: default avatarShivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c328ae39
......@@ -3127,7 +3127,6 @@ void cl_page_list_disown (const struct lu_env *env,
struct cl_io *io, struct cl_page_list *plist);
void cl_2queue_init (struct cl_2queue *queue);
void cl_2queue_add (struct cl_2queue *queue, struct cl_page *page);
void cl_2queue_disown (const struct lu_env *env,
struct cl_io *io, struct cl_2queue *queue);
void cl_2queue_discard (const struct lu_env *env,
......
......@@ -298,7 +298,10 @@ ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io,
}
if (likely(do_io)) {
cl_2queue_add(queue, clp);
/*
* Add a page to the incoming page list of 2-queue.
*/
cl_page_list_add(&queue->c2_qin, clp);
/*
* Set page clip to tell transfer formation engine
......
......@@ -849,7 +849,7 @@ static int vvp_io_read_page(const struct lu_env *env,
* Add page into the queue even when it is marked uptodate above.
* this will unlock it automatically as part of cl_page_list_disown().
*/
cl_2queue_add(queue, page);
cl_page_list_add(&queue->c2_qin, page);
if (sbi->ll_ra_info.ra_max_pages_per_file &&
sbi->ll_ra_info.ra_max_pages)
ll_readahead(env, io, ras,
......
......@@ -1211,15 +1211,6 @@ void cl_2queue_init(struct cl_2queue *queue)
}
EXPORT_SYMBOL(cl_2queue_init);
/**
* Add a page to the incoming page list of 2-queue.
*/
void cl_2queue_add(struct cl_2queue *queue, struct cl_page *page)
{
cl_page_list_add(&queue->c2_qin, page);
}
EXPORT_SYMBOL(cl_2queue_add);
/**
* Disown pages in both lists of a 2-queue.
*/
......@@ -1258,7 +1249,10 @@ EXPORT_SYMBOL(cl_2queue_fini);
void cl_2queue_init_page(struct cl_2queue *queue, struct cl_page *page)
{
cl_2queue_init(queue);
cl_2queue_add(queue, page);
/*
* Add a page to the incoming page list of 2-queue.
*/
cl_page_list_add(&queue->c2_qin, page);
}
EXPORT_SYMBOL(cl_2queue_init_page);
......
......@@ -1228,8 +1228,10 @@ static int cl_echo_object_brw(struct echo_object *eco, int rw, u64 offset,
cl_page_put(env, clp);
break;
}
cl_2queue_add(queue, clp);
/*
* Add a page to the incoming page list of 2-queue.
*/
cl_page_list_add(&queue->c2_qin, clp);
/* drop the reference count for cl_page_find, so that the page
* will be freed in cl_2queue_fini. */
......
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