ubifs: journal: Fix error return code in ubifs_jnl_write_inode()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 8 May 2021 03:33:13 +0000 (11:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:18 +0000 (16:02 +0200)
commita8ec86ea25b3e6adbf2b3dfb08a31ce458a89b72
treea72c20aec3cc572832116bcebcc702a482f2cdc7
parent3026b0c9d933f3728b0a9dcd4d0e932c3698c6e7
ubifs: journal: Fix error return code in ubifs_jnl_write_inode()

[ Upstream commit a2c2a622d41168f9fea2aa3f76b9fbaa88531aac ]

Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Fixes: 9ca2d7326444 ("ubifs: Limit number of xattrs per inode")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ubifs/journal.c