Skip to content

Commit

Permalink
BUGFIX: safe list_del when destroying cp_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy Zha committed Nov 9, 2015
1 parent 9929e6e commit ee75a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/hmfs/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ int init_checkpoint_manager(struct hmfs_sb_info *sbi)
static void destroy_checkpoint_info(struct hmfs_cm_info *cm_i)
{
struct checkpoint_info *cp_i = cm_i->last_cp_i, *entry;
struct list_head *head, *this;
struct list_head *head, *this, *tmp;

head = &cp_i->list;
list_for_each(this, head) {
list_for_each_safe(this, tmp, head) {
entry = list_entry(this, struct checkpoint_info, list);
list_del(this);
radix_tree_delete(&cm_i->cp_tree_root, entry->version);
Expand Down

0 comments on commit ee75a44

Please sign in to comment.