diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-06-14 02:23:22 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-06-15 11:42:28 -0400 |
commit | 67cde3448d951b55088a6ea3bb1aee0160068fb9 (patch) | |
tree | 762aa0d1a09f8ea58f7a861b32b67c71ae5a8df1 /fs/btrfs/delayed-inode.c | |
parent | ed0eaa14981e87a1e185b61e4ef621c440e3930c (diff) |
Btrfs: destroy the items of the delayed inodes in error handling routine
the items of the delayed inodes were forgotten to be freed, this patch
fixes it.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index c18d0442ae6d..2399f4086915 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1879,3 +1879,21 @@ void btrfs_kill_all_delayed_nodes(struct btrfs_root *root) } } } + +void btrfs_destroy_delayed_inodes(struct btrfs_root *root) +{ + struct btrfs_delayed_root *delayed_root; + struct btrfs_delayed_node *curr_node, *prev_node; + + delayed_root = btrfs_get_delayed_root(root); + + curr_node = btrfs_first_delayed_node(delayed_root); + while (curr_node) { + __btrfs_kill_delayed_node(curr_node); + + prev_node = curr_node; + curr_node = btrfs_next_delayed_node(curr_node); + btrfs_release_delayed_node(prev_node); + } +} + |