From 2a481e4f72a409938043049ed33d47bd0399e770 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 19 Aug 2004 19:58:12 +0000 Subject: [PATCH] - missed BKLs in ext3_ext_new_extent_cb() - minor cleanups --- lustre/lvfs/fsfilt_ext3.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 551d3a7..2c04a37 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -749,7 +749,9 @@ static int ext3_ext_new_extent_cb(struct ext3_extents_tree *tree, count = ext3_ext_calc_credits_for_insert(tree, path); up_write(&EXT3_I(inode)->truncate_sem); - handle = ext3_journal_start(inode, count + EXT3_ALLOC_NEEDED + 1); + lock_kernel(); + handle = journal_start(EXT3_JOURNAL(inode), count + EXT3_ALLOC_NEEDED + 1); + unlock_kernel(); if (IS_ERR(handle)) { down_write(&EXT3_I(inode)->truncate_sem); return PTR_ERR(handle); @@ -757,7 +759,9 @@ static int ext3_ext_new_extent_cb(struct ext3_extents_tree *tree, if (tgen != EXT_GENERATION(tree)) { /* the tree has changed. so path can be invalid at moment */ - ext3_journal_stop(handle, inode); + lock_kernel(); + journal_stop(handle); + unlock_kernel(); down_write(&EXT3_I(inode)->truncate_sem); return EXT_REPEAT; } @@ -788,7 +792,9 @@ static int ext3_ext_new_extent_cb(struct ext3_extents_tree *tree, } out: - ext3_journal_stop(handle, inode); + lock_kernel(); + journal_stop(handle); + unlock_kernel(); map: if (err >= 0) { /* map blocks */ -- 1.8.3.1