From eddf90c630af89fbe4caec2f367239df74cc4ba7 Mon Sep 17 00:00:00 2001 From: Jiaying Zhang Date: Sat, 13 Aug 2011 12:17:13 -0400 Subject: [PATCH] --- yaml --- r: 263166 b: refs/heads/master c: 2581fdc810889fdea97689cb62481201d579c796 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/inode.c | 6 ++++++ trunk/fs/ext4/super.c | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 93e924ebbf90..e261deec8183 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 441c850857148935babe000fc2ba1455fe54a6a9 +refs/heads/master: 2581fdc810889fdea97689cb62481201d579c796 diff --git a/trunk/fs/ext4/inode.c b/trunk/fs/ext4/inode.c index ad3a7ca21069..7dd698107822 100644 --- a/trunk/fs/ext4/inode.c +++ b/trunk/fs/ext4/inode.c @@ -120,6 +120,12 @@ void ext4_evict_inode(struct inode *inode) int err; trace_ext4_evict_inode(inode); + + mutex_lock(&inode->i_mutex); + ext4_flush_completed_IO(inode); + mutex_unlock(&inode->i_mutex); + ext4_ioend_wait(inode); + if (inode->i_nlink) { /* * When journalling data dirty buffers are tracked only in the diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index 4687fea0c00f..44d0c8db2239 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -919,7 +919,6 @@ static void ext4_i_callback(struct rcu_head *head) static void ext4_destroy_inode(struct inode *inode) { - ext4_ioend_wait(inode); if (!list_empty(&(EXT4_I(inode)->i_orphan))) { ext4_msg(inode->i_sb, KERN_ERR, "Inode %lu (%p): orphan list check failed!",