]> git.hungrycats.org Git - linux/commit
Btrfs: call inode_dec_link_count() on mkdir error path
authorWang Shilong <wangshilong1991@gmail.com>
Wed, 24 Dec 2014 06:45:30 +0000 (14:45 +0800)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Mon, 5 Jan 2015 21:46:04 +0000 (16:46 -0500)
commita89d46fee543f7ca4cc876a2ca51fc8b610bc426
tree1f542daab15ded756ffeff808cc02b2902124f60
parentba7c6950a3d4f3fa07c6bc71a0fccc92cdfbff9d
Btrfs: call inode_dec_link_count() on mkdir error path

In btrfs_mkdir(), if it fails to create dir, we should
clean up existed items, setting inode's link properly
to make sure it could be cleaned up properly.

Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit c7cfb8a5405a34777d670f7a5441bb2c7ca9730f)
fs/btrfs/inode.c