aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/ntfs3/index.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-08-24 10:49:32 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2021-08-27 17:05:14 +0300
commit04810f000afdbdd37825ca7f563f036119422cb7 (patch)
tree6f599ff6883e43924cd3ae36c3a0b6849923378e /fs/ntfs3/index.c
parentfs/ntfs3: fix an error code in ntfs_get_acl_ex() (diff)
downloadwireguard-linux-04810f000afdbdd37825ca7f563f036119422cb7.tar.xz
wireguard-linux-04810f000afdbdd37825ca7f563f036119422cb7.zip
fs/ntfs3: Fix error code in indx_add_allocate()
Return -EINVAL if ni_find_attr() fails. Don't return success. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Kari Argillander <kari.argillander@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/index.c')
-rw-r--r--fs/ntfs3/index.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 334a3cef714b..5fb41c9c8910 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1500,6 +1500,7 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni,
alloc = ni_find_attr(ni, NULL, NULL, ATTR_ALLOC, in->name, in->name_len,
NULL, &mi);
if (!alloc) {
+ err = -EINVAL;
if (bmp)
goto out2;
goto out1;