mirror of
https://github.com/torvalds/linux.git
synced 2024-10-23 05:30:55 +00:00
fs/ntfs3: Fix error code in indx_add_allocate()
Return -EINVAL if ni_find_attr() fails. Don't return success.
Fixes: 82cae269cf
("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>
This commit is contained in:
parent
2926e42970
commit
04810f000a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user