linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shivani Bhardwaj <shivanib134@gmail.com>
To: gregkh@linuxfoundation.org
Cc: oleg.drokin@intel.com, andreas.dilger@intel.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] Staging: lustre: statahead: Remove agl_list_empty wrapper
Date: Sat,  7 Nov 2015 15:23:11 +0530	[thread overview]
Message-ID: <c60e728451919879246fb3210e38a2032c7521ae.1446889164.git.shivanib134@gmail.com> (raw)
In-Reply-To: <cover.1446889164.git.shivanib134@gmail.com>

Remove the function agl_list_empty() and replace its calls with the
function it wrapped.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
 drivers/staging/lustre/lustre/llite/statahead.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c
index 3a1d294..caee0a6 100644
--- a/drivers/staging/lustre/lustre/llite/statahead.c
+++ b/drivers/staging/lustre/lustre/llite/statahead.c
@@ -428,7 +428,7 @@ static void ll_agl_add(struct ll_statahead_info *sai,
 
 		igrab(inode);
 		spin_lock(&parent->lli_agl_lock);
-		if (agl_list_empty(sai))
+		if (list_empty(&sai->sai_entries_agl))
 			added = 1;
 		list_add_tail(&child->lli_agl_list, &sai->sai_entries_agl);
 		spin_unlock(&parent->lli_agl_lock);
@@ -522,7 +522,7 @@ static void ll_sai_put(struct ll_statahead_info *sai)
 		LASSERT(list_empty(&sai->sai_entries_stated));
 
 		LASSERT(atomic_read(&sai->sai_cache_count) == 0);
-		LASSERT(agl_list_empty(sai));
+		LASSERT(list_empty(&sai->sai_entries_agl));
 
 		iput(inode);
 		kfree(sai);
@@ -955,7 +955,7 @@ static int ll_agl_thread(void *arg)
 
 	while (1) {
 		l_wait_event(thread->t_ctl_waitq,
-			     !agl_list_empty(sai) ||
+			     !list_empty(&sai->sai_entries_agl) ||
 			     !thread_is_running(thread),
 			     &lwi);
 
@@ -965,7 +965,7 @@ static int ll_agl_thread(void *arg)
 		spin_lock(&plli->lli_agl_lock);
 		/* The statahead thread maybe help to process AGL entries,
 		 * so check whether list empty again. */
-		if (!agl_list_empty(sai)) {
+		if (!list_empty(&sai->sai_entries_agl)) {
 			clli = list_entry(sai->sai_entries_agl.next,
 					  struct ll_inode_info, lli_agl_list);
 			list_del_init(&clli->lli_agl_list);
@@ -978,7 +978,7 @@ static int ll_agl_thread(void *arg)
 
 	spin_lock(&plli->lli_agl_lock);
 	sai->sai_agl_valid = 0;
-	while (!agl_list_empty(sai)) {
+	while (!list_empty(&sai->sai_entries_agl)) {
 		clli = list_entry(sai->sai_entries_agl.next,
 				  struct ll_inode_info, lli_agl_list);
 		list_del_init(&clli->lli_agl_list);
@@ -1121,7 +1121,7 @@ keep_it:
 			l_wait_event(thread->t_ctl_waitq,
 				     !sa_sent_full(sai) ||
 				     !list_empty(&sai->sai_entries_received) ||
-				     !agl_list_empty(sai) ||
+				     !list_empty(&sai->sai_entries_agl) ||
 				     !thread_is_running(thread),
 				     &lwi);
 
@@ -1140,7 +1140,7 @@ interpret_it:
 			 * to process the AGL entries. */
 			if (sa_sent_full(sai)) {
 				spin_lock(&plli->lli_agl_lock);
-				while (!agl_list_empty(sai)) {
+				while (!list_empty(&sai->sai_entries_agl)) {
 					clli = list_entry(sai->sai_entries_agl.next,
 							  struct ll_inode_info, lli_agl_list);
 					list_del_init(&clli->lli_agl_list);
@@ -1198,7 +1198,7 @@ do_it:
 			}
 
 			spin_lock(&plli->lli_agl_lock);
-			while (!agl_list_empty(sai) &&
+			while (!list_empty(&sai->sai_entries_agl) &&
 			       thread_is_running(thread)) {
 				clli = list_entry(sai->sai_entries_agl.next,
 						  struct ll_inode_info, lli_agl_list);
-- 
2.1.0


      parent reply	other threads:[~2015-11-07  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07  9:49 [PATCH 0/5] Remove wrappers from statahead Shivani Bhardwaj
2015-11-07  9:50 ` [PATCH 1/5] Staging: lustre: statahead: Remove ll_sa_entry_unhashed wrapper Shivani Bhardwaj
2015-11-07  9:50 ` [PATCH 2/5] Staging: lustre: statahead: Remove sa_first_received_entry wrapper Shivani Bhardwaj
2015-11-07  9:51 ` [PATCH 3/5] Staging: lustre: statahead: Remove agl_first_entry wrapper Shivani Bhardwaj
2015-11-07  9:52 ` [PATCH 4/5] Staging: lustre: statahead: Remove sa_received_empty wrapper Shivani Bhardwaj
2015-11-07  9:53 ` Shivani Bhardwaj [this message]

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=c60e728451919879246fb3210e38a2032c7521ae.1446889164.git.shivanib134@gmail.com \
    --to=shivanib134@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.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).