aboutsummaryrefslogtreecommitdiffstats
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,
123 brelse(bh); 123 brelse(bh);
124 124
125 failed_unlock: 125 failed_unlock:
126 nilfs_transaction_end(sb, !err); 126 if (likely(!err))
127 err = nilfs_transaction_commit(sb);
128 else
129 nilfs_transaction_abort(sb);
127 if (writer) 130 if (writer)
128 nilfs_put_writer(nilfs); 131 nilfs_put_writer(nilfs);
129 out: 132 out: