diff options
author | Curt Wohlgemuth <curtw@google.com> | 2009-09-29 16:06:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-14 08:07:08 -0800 |
commit | 94ab12a2649b1e86677771d310a20752ba5b1542 (patch) | |
tree | 9dbcfa62e280baf841381428a7e59d5fa5b3666b /fs | |
parent | 46d67b3c075b0d1630b57630f956edb1dad61baa (diff) |
ext4: Make sure ext4_dirty_inode() updates the inode in no journal mode
(cherry picked from commit f3dc272fd5e2ae08244796bb39e7e1ce4b25d3b3)
This patch a problem that ext4_dirty_inode() was not calling
ext4_mark_inode_dirty() if the current_handle is not valid, which it
is the case in no journal mode.
It also removes a test for non-matching transaction which can never
happen.
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 90ce6f2cdad..30b1f3bf818 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5605,24 +5605,13 @@ void ext4_dirty_inode(struct inode *inode) handle_t *current_handle = ext4_journal_current_handle(); handle_t *handle; - if (!ext4_handle_valid(current_handle)) { - ext4_mark_inode_dirty(current_handle, inode); - return; - } - handle = ext4_journal_start(inode, 2); if (IS_ERR(handle)) goto out; - if (current_handle && - current_handle->h_transaction != handle->h_transaction) { - /* This task has a transaction open against a different fs */ - printk(KERN_EMERG "%s: transactions do not match!\n", - __func__); - } else { - jbd_debug(5, "marking dirty. outer handle=%p\n", - current_handle); - ext4_mark_inode_dirty(handle, inode); - } + + jbd_debug(5, "marking dirty. outer handle=%p\n", current_handle); + ext4_mark_inode_dirty(handle, inode); + ext4_journal_stop(handle); out: return; |