From: Edward Shishkin <edward.shishkin@gmail.com>
To: reiserfs-devel@vger.kernel.org
Subject: [patch 2/4] reiser4: lock wb-list when calling writeback_sb_inodes
Date: Sun, 21 Oct 2012 19:59:15 +0200 [thread overview]
Message-ID: <508437F3.2070100@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: reiser4-lock-wb-list.patch --]
[-- Type: text/x-patch, Size: 1019 bytes --]
Lock the wb-list, when calling writeback_sb_inodes()
Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
---
fs/reiser4/entd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- linux-3.5.3.orig/fs/reiser4/entd.c
+++ linux-3.5.3/fs/reiser4/entd.c
@@ -240,6 +240,7 @@ static void entd_flush(struct super_bloc
if (rq->wbc->nr_to_write > 0) {
long result;
+ struct bdi_writeback *wb;
struct wb_writeback_work work = {
.sb = super,
.sync_mode = WB_SYNC_NONE,
@@ -257,11 +258,15 @@ static void entd_flush(struct super_bloc
* (via igrab), so that shutdown_super() will wait
* (on reiser4_put_super) for entd completion.
*/
+ wb = &rq->mapping->backing_dev_info->wb;
+
+ spin_lock(&wb->list_lock);
result = generic_writeback_sb_inodes(super,
- &rq->mapping->backing_dev_info->wb,
+ wb,
rq->wbc,
&work,
true);
+ spin_unlock(&wb->list_lock);
}
rq->wbc->nr_to_write = ENTD_CAPTURE_APAGE_BURST;
reply other threads:[~2012-10-21 17:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=508437F3.2070100@gmail.com \
--to=edward.shishkin@gmail.com \
--cc=reiserfs-devel@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.