Move writeout procession under journal.

Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>
---
 fs/ext4/namei.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index c66b4f7f85ae..e2dea0b7b5a7 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -3452,18 +3452,18 @@ static int ext4_rename(struct inode *old_dir, struct 
dentry *old_dentry,
        retval = 0;
 
 end_rename:
-       if (handle)
-               ext4_journal_stop(handle);
-out_release:
-       brelse(old.dir_bh);
-       brelse(old.bh);
-       brelse(new.bh);
        if (whiteout) {
                if (retval)
                        drop_nlink(whiteout);
                unlock_new_inode(whiteout);
                iput(whiteout);
        }
+       if (handle)
+               ext4_journal_stop(handle);
+out_release:
+       brelse(old.dir_bh);
+       brelse(old.bh);
+       brelse(new.bh);
        return retval;
 }
 


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to