This is a note to let you know that I've just added the patch titled
writeback: fix NULL bdi->dev in trace writeback_single_inode
to the 3.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
writeback-fix-null-bdi-dev-in-trace-writeback_single_inode.patch
and it can be found in the queue-3.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 15eb77a07c714ac80201abd0a9568888bcee6276 Mon Sep 17 00:00:00 2001
From: Wu Fengguang <[email protected]>
Date: Tue, 17 Jan 2012 11:18:56 -0600
Subject: writeback: fix NULL bdi->dev in trace writeback_single_inode
From: Wu Fengguang <[email protected]>
commit 15eb77a07c714ac80201abd0a9568888bcee6276 upstream.
bdi_prune_sb() resets sb->s_bdi to default_backing_dev_info when the
tearing down the original bdi. Fix trace_writeback_single_inode to
use sb->s_bdi=default_backing_dev_info rather than bdi->dev=NULL for a
teared down bdi.
Reported-by: Rabin Vincent <[email protected]>
Tested-by: Rabin Vincent <[email protected]>
Signed-off-by: Wu Fengguang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/fs-writeback.c | 16 ++++++++--------
include/trace/events/writeback.h | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -48,14 +48,6 @@ struct wb_writeback_work {
};
/*
- * Include the creation of the trace points after defining the
- * wb_writeback_work structure so that the definition remains local to this
- * file.
- */
-#define CREATE_TRACE_POINTS
-#include <trace/events/writeback.h>
-
-/*
* We don't actually have pdflush, but this one is exported though /proc...
*/
int nr_pdflush_threads;
@@ -87,6 +79,14 @@ static inline struct inode *wb_inode(str
return list_entry(head, struct inode, i_wb_list);
}
+/*
+ * Include the creation of the trace points after defining the
+ * wb_writeback_work structure and inline functions so that the definition
+ * remains local to this file.
+ */
+#define CREATE_TRACE_POINTS
+#include <trace/events/writeback.h>
+
/* Wakeup flusher thread or forker thread to fork it. Requires bdi->wb_lock. */
static void bdi_wakeup_flusher(struct backing_dev_info *bdi)
{
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -418,7 +418,7 @@ DECLARE_EVENT_CLASS(writeback_single_ino
TP_fast_assign(
strncpy(__entry->name,
- dev_name(inode->i_mapping->backing_dev_info->dev), 32);
+ dev_name(inode_to_bdi(inode)->dev), 32);
__entry->ino = inode->i_ino;
__entry->state = inode->i_state;
__entry->dirtied_when = inode->dirtied_when;
Patches currently in stable-queue which might be from [email protected] are
queue-3.2/writeback-fix-dereferencing-null-bdi-dev-on-trace_writeback_queue.patch
queue-3.2/lib-proportion-lower-prop_max_shift-to-32-on-64-bit-kernel.patch
queue-3.2/writeback-fix-null-bdi-dev-in-trace-writeback_single_inode.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html