Blame SOURCES/0023-fs-ntfs3-Fix-error-code-in-indx_add_allocate.patch
|
Kmods SIG |
63c143 |
From 04810f000afdbdd37825ca7f563f036119422cb7 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
63c143 |
From: Dan Carpenter <dan.carpenter@oracle.com>
|
|
Kmods SIG |
63c143 |
Date: Tue, 24 Aug 2021 10:49:32 +0300
|
|
Kmods SIG |
63c143 |
Subject: [Backport 04810f000afd] src: Fix error code in
|
|
Kmods SIG |
63c143 |
indx_add_allocate()
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
Return -EINVAL if ni_find_attr() fails. Don't return success.
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
Fixes: 82cae269cfa9 ("src: Add initialization of super block")
|
|
Kmods SIG |
63c143 |
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
|
Kmods SIG |
63c143 |
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
63c143 |
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
63c143 |
---
|
|
Kmods SIG |
63c143 |
src/index.c | 1 +
|
|
Kmods SIG |
63c143 |
1 file changed, 1 insertion(+)
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
diff --git a/src/index.c b/src/index.c
|
|
Kmods SIG |
63c143 |
index 334a3cef714b3e5c5b6fc31b3fd33d39bb5caa25..5fb41c9c89100aee4d6d0e8f7cf65556aec11250 100644
|
|
Kmods SIG |
63c143 |
--- a/src/index.c
|
|
Kmods SIG |
63c143 |
+++ b/src/index.c
|
|
Kmods SIG |
63c143 |
@@ -1500,6 +1500,7 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni,
|
|
Kmods SIG |
63c143 |
alloc = ni_find_attr(ni, NULL, NULL, ATTR_ALLOC, in->name, in->name_len,
|
|
Kmods SIG |
63c143 |
NULL, &mi);
|
|
Kmods SIG |
63c143 |
if (!alloc) {
|
|
Kmods SIG |
63c143 |
+ err = -EINVAL;
|
|
Kmods SIG |
63c143 |
if (bmp)
|
|
Kmods SIG |
63c143 |
goto out2;
|
|
Kmods SIG |
63c143 |
goto out1;
|
|
Kmods SIG |
63c143 |
--
|
|
Kmods SIG |
63c143 |
2.31.1
|
|
Kmods SIG |
63c143 |
|