]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: Don't leak orphans on memory during commit
authorRichard Weinberger <richard@nod.at>
Wed, 15 May 2019 19:52:34 +0000 (21:52 +0200)
committerRichard Weinberger <richard@nod.at>
Mon, 8 Jul 2019 18:01:34 +0000 (20:01 +0200)
commitfb7af80afb0337541f7f387bce51ec01df0b30b1
tree0fde24e7c17f6b7eeefaf835613a776f3bfed4e5
parent189c24a80a1ac32ee9dbe73e45e2a435c87558fe
ubifs: Don't leak orphans on memory during commit

If an orphan has child orphans (xattrs), and due
to a commit the parent orpahn cannot get free()'ed immediately,
put also all child orphans on the erase list.
Otherwise UBIFS will free() them only upon unmount and we
waste memory.

Fixes: 742de5cbe347 ("ubifs: orphan: Handle xattrs like files")
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/orphan.c