diff --git a/[refs] b/[refs] index c53ffb484660..57e531dd3421 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aa43507f68e44fbc014d820e47eda5a369b8dc9d +refs/heads/master: a2617dc6863b21a8109c199ab533b3dbfe178f27 diff --git a/trunk/fs/f2fs/checkpoint.c b/trunk/fs/f2fs/checkpoint.c index 9c1627165039..d3b34d05211f 100644 --- a/trunk/fs/f2fs/checkpoint.c +++ b/trunk/fs/f2fs/checkpoint.c @@ -219,19 +219,11 @@ void add_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino) new->ino = ino; /* add new_oentry into list which is sorted by inode number */ - if (orphan) { - struct orphan_inode_entry *prev; - - /* get previous entry */ - prev = list_entry(orphan->list.prev, typeof(*prev), list); - if (&prev->list != head) - /* insert new orphan inode entry */ - list_add(&new->list, &prev->list); - else - list_add(&new->list, head); - } else { + if (orphan) + list_add(&new->list, this->prev); + else list_add_tail(&new->list, head); - } + sbi->n_orphans++; out: mutex_unlock(&sbi->orphan_inode_mutex);