Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1264790

[PATCH 1/5] Staging: lustre: statahead: Remove ll_sa_entry_unhashed wrapper

From Shivani Bhardwaj <shivanib134@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/5] Staging: lustre: statahead: Remove ll_sa_entry_unhashed wrapper
Date 2015-11-07 11:00 +0100
Message-ID <qs8rU-Av-23@gated-at.bofh.it> (permalink)
References <qs8rT-Av-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Remove the function ll_sa_entry_unhashed() and replace all its calls
with the function list_empty() that it wrapped.

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

diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c
index 18f5f2b..8085557 100644
--- a/drivers/staging/lustre/lustre/llite/statahead.c
+++ b/drivers/staging/lustre/lustre/llite/statahead.c
@@ -87,11 +87,6 @@ struct ll_sa_entry {
 static unsigned int sai_generation;
 static DEFINE_SPINLOCK(sai_generation_lock);
 
-static inline int ll_sa_entry_unhashed(struct ll_sa_entry *entry)
-{
-	return list_empty(&entry->se_hash);
-}
-
 /*
  * The entry only can be released by the caller, it is necessary to hold lock.
  */
@@ -331,7 +326,7 @@ static void ll_sa_entry_put(struct ll_statahead_info *sai,
 
 		LASSERT(list_empty(&entry->se_link));
 		LASSERT(list_empty(&entry->se_list));
-		LASSERT(ll_sa_entry_unhashed(entry));
+		LASSERT(list_empty(&entry->se_hash));
 
 		ll_sa_entry_cleanup(sai, entry);
 		iput(entry->se_inode);
@@ -346,7 +341,7 @@ do_sa_entry_fini(struct ll_statahead_info *sai, struct ll_sa_entry *entry)
 {
 	struct ll_inode_info *lli = ll_i2info(sai->sai_inode);
 
-	LASSERT(!ll_sa_entry_unhashed(entry));
+	LASSERT(!list_empty(&entry->se_hash));
 	LASSERT(!list_empty(&entry->se_link));
 
 	ll_sa_entry_unhash(sai, entry);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] Remove wrappers from statahead Shivani Bhardwaj <shivanib134@gmail.com> - 2015-11-07 11:00 +0100
  [PATCH 1/5] Staging: lustre: statahead: Remove ll_sa_entry_unhashed wrapper Shivani Bhardwaj <shivanib134@gmail.com> - 2015-11-07 11:00 +0100
  [PATCH 5/5] Staging: lustre: statahead: Remove agl_list_empty wrapper Shivani Bhardwaj <shivanib134@gmail.com> - 2015-11-07 11:00 +0100
  [PATCH 3/5] Staging: lustre: statahead: Remove agl_first_entry wrapper Shivani Bhardwaj <shivanib134@gmail.com> - 2015-11-07 11:00 +0100

csiph-web