]> git.baikalelectronics.ru Git - kernel.git/commit
fs/ntfs3: fix an error code in ntfs_get_acl_ex()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Aug 2021 11:48:58 +0000 (14:48 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 27 Aug 2021 14:05:13 +0000 (17:05 +0300)
commitf59831c36c0e6bc61e0ccae2b29cdee27e2315ff
tree3b5e6902bbdc8cfbe6686fba3feb67a8cec9269f
parentb5f1556ae95b984b16e0d3e93d6ab24e5eb65f74
fs/ntfs3: fix an error code in ntfs_get_acl_ex()

The ntfs_get_ea() function returns negative error codes or on success
it returns the length.  In the original code a zero length return was
treated as -ENODATA and results in a NULL return.  But it should be
treated as an invalid length and result in an PTR_ERR(-EINVAL) return.

Fixes: 8265e412e05b ("fs/ntfs3: Add attrib operations")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/xattr.c