X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fext3%2Fioctl.c;h=4af574ce4a4638c651006ff8ce73ca61dbe7a14f;hb=ac69e0928054ff29a5049902fb477f9c7605c773;hp=8e37c41a071b31e90756f9b0762e37a2ac362065;hpb=72f318897e50c29b91efd1ed24515a93c138a2ba;p=karo-tx-linux.git diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c index 8e37c41a071b..4af574ce4a46 100644 --- a/fs/ext3/ioctl.c +++ b/fs/ext3/ioctl.c @@ -134,10 +134,11 @@ flags_out: goto setversion_out; } + mutex_lock(&inode->i_mutex); handle = ext3_journal_start(inode, 1); if (IS_ERR(handle)) { err = PTR_ERR(handle); - goto setversion_out; + goto unlock_out; } err = ext3_reserve_inode_write(handle, inode, &iloc); if (err == 0) { @@ -146,6 +147,9 @@ flags_out: err = ext3_mark_iloc_dirty(handle, inode, &iloc); } ext3_journal_stop(handle); + +unlock_out: + mutex_unlock(&inode->i_mutex); setversion_out: mnt_drop_write_file(filp); return err;