Commit f7691084 authored by Adrian Hunter's avatar Adrian Hunter Committed by Artem Bityutskiy

UBIFS: correct orphan deletion order

The debug function that checks orphans, does so using the
TNC mutex. That means it will not see a correct picture
if the inode is removed from the orphan tree before it is
removed from TNC.
Signed-off-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
parent 7d62ff2c
...@@ -871,10 +871,11 @@ int ubifs_jnl_delete_inode(struct ubifs_info *c, const struct inode *inode) ...@@ -871,10 +871,11 @@ int ubifs_jnl_delete_inode(struct ubifs_info *c, const struct inode *inode)
return ubifs_jnl_write_inode(c, inode); return ubifs_jnl_write_inode(c, inode);
} }
ubifs_delete_orphan(c, inode->i_ino);
err = ubifs_tnc_remove_ino(c, inode->i_ino); err = ubifs_tnc_remove_ino(c, inode->i_ino);
if (err) if (err)
ubifs_ro_mode(c, err); ubifs_ro_mode(c, err);
else
ubifs_delete_orphan(c, inode->i_ino);
up_read(&c->commit_sem); up_read(&c->commit_sem);
return err; return err;
} }
......
Markdown is supported
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