Commit ec6f9553 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs: locking fix

From: Chris Mason <mason@suse.com>

Make sure to hold the BKL while ending a transaction in the error path or
reiserfs_prepare_write.
parent bb0d9672
......@@ -2258,8 +2258,11 @@ int reiserfs_prepare_write(struct file *f, struct page *page,
if (th->t_refcount > old_ref) {
if (old_ref)
th->t_refcount--;
else
else {
reiserfs_write_lock(inode->i_sb);
reiserfs_end_persistent_transaction(th);
reiserfs_write_unlock(inode->i_sb);
}
}
}
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment