ubifs: journal: Handle xattrs like files
authorRichard Weinberger <richard@nod.at>
Thu, 4 Apr 2019 22:34:36 +0000 (00:34 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 7 May 2019 19:58:30 +0000 (21:58 +0200)
commit7959cf3a7506d4a2100d5d6f37f605c2f54af488
tree28b53e427975fb721005935e118a30b175aee2eb
parent257bb92420d63c4d38da4cf0ae9a0b61ac985eca
ubifs: journal: Handle xattrs like files

If an inode hosts xattrs, create deletion entries for each
inode. That way we can make sure that upon journal replay UBIFS
can find find all xattr inodes.
Otherwise it can happen that GC consumed already a LEB which contained
parts of the TNC that pointed to the xattrs and we no longer
find all xattr inodes, which will confuse the LPT and cause
space allocation issues.

Reported-by: Stefan Agner <stefan@agner.ch>
Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/journal.c