Revert "ubifs: xattr: Don't operate on deleted inodes"
authorRichard Weinberger <richard@nod.at>
Sun, 16 Sep 2018 21:57:35 +0000 (23:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Sep 2018 10:06:04 +0000 (03:06 -0700)
commit1d7e23f9068fc4c6047457eaace8453ec2d220f5
tree6795e91997eb0c6a3b9a6f99391818acb0768499
parent44383139a39c46d08c8e169121c16aeb0427d147
Revert "ubifs: xattr: Don't operate on deleted inodes"

commit f061c1cc404a618858a77aea233fde0aeaad2f2d upstream.

This reverts commit 11a6fc3dc743e22fb50f2196ec55bee5140d3c52.
UBIFS wants to assert that xattr operations are only issued on files
with positive link count. The said patch made this operations return
-ENOENT for unlinked files such that the asserts will no longer trigger.
This was wrong since xattr operations are perfectly fine on unlinked
files.
Instead the assertions need to be fixed/removed.

Cc: <stable@vger.kernel.org>
Fixes: 11a6fc3dc743 ("ubifs: xattr: Don't operate on deleted inodes")
Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ubifs/xattr.c