writeback: remove smp_mb(), it's not needed with list_add_tail_rcu()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, September 16, 2009 - 7:59 am

Gitweb:     http://git.kernel.org/linus/deed62edffe600bc5b379c872d3004116e001b66
Commit:     deed62edffe600bc5b379c872d3004116e001b66
Parent:     49db041430e8a856dbc3af15430bf068f1c74655
Author:     Nick Piggin <npiggin@suse.de>
AuthorDate: Tue Sep 15 21:32:58 2009 +0200
Committer:  Jens Axboe <jens.axboe@oracle.com>
CommitDate: Wed Sep 16 15:18:52 2009 +0200

    writeback: remove smp_mb(), it's not needed with list_add_tail_rcu()
    
    list_add_tail_rcu contains required barriers.
    
    Signed-off-by: Nick Piggin <npiggin@suse.de>
    Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
---
 fs/fs-writeback.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 3475775..59c99e7 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -151,10 +151,10 @@ static void bdi_queue_work(struct backing_dev_info *bdi, struct bdi_work *work)
 	BUG_ON(!bdi->wb_cnt);
 
 	/*
-	 * Make sure stores are seen before it appears on the list
+	 * list_add_tail_rcu() contains the necessary barriers to
+	 * make sure the above stores are seen before the item is
+	 * noticed on the list
 	 */
-	smp_mb();
-
 	spin_lock(&bdi->wb_lock);
 	list_add_tail_rcu(&work->list, &bdi->work_list);
 	spin_unlock(&bdi->wb_lock);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
writeback: remove smp_mb(), it's not needed with list_add_ ..., Linux Kernel Mailing ..., (Wed Sep 16, 7:59 am)