All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gu Zheng <guz.fnst@cn.fujitsu.com>
To: Kim <jaegeuk.kim@samsung.com>
Cc: fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	f2fs <linux-f2fs-devel@lists.sourceforge.net>
Subject: [PATCH 2/7] f2fs: remove the unuseful "issue_tail" list
Date: Fri, 11 Apr 2014 17:49:43 +0800	[thread overview]
Message-ID: <5347BAB7.6060306@cn.fujitsu.com> (raw)

With the issue_list and dispatch_list, we can handle flush_merge
already, so remove the useless "issue_tail" list.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
---
 fs/f2fs/f2fs.h    |    1 -
 fs/f2fs/segment.c |    5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 2ecac83..90109fa 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -358,7 +358,6 @@ struct f2fs_sm_info {
 	struct flush_cmd *issue_list;		/* list for command issue */
 	struct flush_cmd *dispatch_list;	/* list for command dispatch */
 	spinlock_t issue_lock;			/* for issue list lock */
-	struct flush_cmd *issue_tail;		/* list tail of issue list */
 };
 
 /*
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 524b7ed..8a6fe2a 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -209,7 +209,7 @@ repeat:
 	spin_lock(&sm_i->issue_lock);
 	if (sm_i->issue_list) {
 		sm_i->dispatch_list = sm_i->issue_list;
-		sm_i->issue_list = sm_i->issue_tail = NULL;
+		sm_i->issue_list = NULL;
 	}
 	spin_unlock(&sm_i->issue_lock);
 
@@ -250,10 +250,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi)
 
 	spin_lock(&sm_i->issue_lock);
 	if (sm_i->issue_list)
-		sm_i->issue_tail->next = cmd;
+		sm_i->issue_list->next = cmd;
 	else
 		sm_i->issue_list = cmd;
-	sm_i->issue_tail = cmd;
 	spin_unlock(&sm_i->issue_lock);
 
 	if (!sm_i->dispatch_list)
-- 
1.7.7


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees

WARNING: multiple messages have this Message-ID (diff)
From: Gu Zheng <guz.fnst@cn.fujitsu.com>
To: Kim <jaegeuk.kim@samsung.com>
Cc: f2fs <linux-f2fs-devel@lists.sourceforge.net>,
	fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/7] f2fs: remove the unuseful "issue_tail" list
Date: Fri, 11 Apr 2014 17:49:43 +0800	[thread overview]
Message-ID: <5347BAB7.6060306@cn.fujitsu.com> (raw)

With the issue_list and dispatch_list, we can handle flush_merge
already, so remove the useless "issue_tail" list.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
---
 fs/f2fs/f2fs.h    |    1 -
 fs/f2fs/segment.c |    5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 2ecac83..90109fa 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -358,7 +358,6 @@ struct f2fs_sm_info {
 	struct flush_cmd *issue_list;		/* list for command issue */
 	struct flush_cmd *dispatch_list;	/* list for command dispatch */
 	spinlock_t issue_lock;			/* for issue list lock */
-	struct flush_cmd *issue_tail;		/* list tail of issue list */
 };
 
 /*
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 524b7ed..8a6fe2a 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -209,7 +209,7 @@ repeat:
 	spin_lock(&sm_i->issue_lock);
 	if (sm_i->issue_list) {
 		sm_i->dispatch_list = sm_i->issue_list;
-		sm_i->issue_list = sm_i->issue_tail = NULL;
+		sm_i->issue_list = NULL;
 	}
 	spin_unlock(&sm_i->issue_lock);
 
@@ -250,10 +250,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi)
 
 	spin_lock(&sm_i->issue_lock);
 	if (sm_i->issue_list)
-		sm_i->issue_tail->next = cmd;
+		sm_i->issue_list->next = cmd;
 	else
 		sm_i->issue_list = cmd;
-	sm_i->issue_tail = cmd;
 	spin_unlock(&sm_i->issue_lock);
 
 	if (!sm_i->dispatch_list)
-- 
1.7.7


             reply	other threads:[~2014-04-11  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11  9:49 Gu Zheng [this message]
2014-04-11  9:49 ` [PATCH 2/7] f2fs: remove the unuseful "issue_tail" list Gu Zheng
2014-04-14  1:12 ` Gu Zheng
2014-04-14  1:12   ` Gu Zheng

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=5347BAB7.6060306@cn.fujitsu.com \
    --to=guz.fnst@cn.fujitsu.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.