Skip to content
Commit fb951eb5 authored by Zongxun Wang's avatar Zongxun Wang Committed by Linus Torvalds
Browse files

ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters



Even if using the same jbd2 handle, we cannot rollback a transaction.
So once some error occurs after successfully allocating clusters, the
allocated clusters will never be used and it means they are lost.  For
example, call ocfs2_claim_clusters successfully when expanding a file,
but failed in ocfs2_insert_extent.  So we need free the allocated
clusters if they are not used indeed.

Signed-off-by: default avatarZongxun Wang <wangzongxun@huawei.com>
Signed-off-by: default avatarJoseph Qi <joseph.qi@huawei.com>
Acked-by: default avatarJoel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Li Zefan <lizefan@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 277cba1d
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