]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: Fix off-by-one error
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 20 Jan 2021 13:12:53 +0000 (14:12 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 12 Feb 2021 20:53:23 +0000 (21:53 +0100)
commit1a4f4053fc7b884ffbdaf851a9d93209bbb44c4d
tree555731f994e440d9d1af6ea4e5583b355b0c60a7
parent9d319ef99b4127e965cc3635467b7d1d5e82d227
ubifs: Fix off-by-one error

An inode is allowed to have ubifs_xattr_max_cnt() xattrs, so we must
complain only when an inode has more xattrs, having exactly
ubifs_xattr_max_cnt() xattrs is fine.
With this the maximum number of xattrs can be created without hitting
the "has too many xattrs" warning when removing it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/journal.c
fs/ubifs/xattr.c