summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/mdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/mdt.c')
-rw-r--r--fs/nilfs2/mdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
index 6ab84757861..e0a632b86fe 100644
--- a/fs/nilfs2/mdt.c
+++ b/fs/nilfs2/mdt.c
@@ -123,7 +123,10 @@ static int nilfs_mdt_create_block(struct inode *inode, unsigned long block,
brelse(bh);
failed_unlock:
- nilfs_transaction_end(sb, !err);
+ if (likely(!err))
+ err = nilfs_transaction_commit(sb);
+ else
+ nilfs_transaction_abort(sb);
if (writer)
nilfs_put_writer(nilfs);
out: