mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 13:27:58 +07:00
xfs: fix an error code in xfs_fs_fill_super()
If alloc_percpu() fails, we accidentally return PTR_ERR(NULL), which
means success, but we intended to return -ENOMEM.
Fixes: 225e463558
('xfs: per-filesystem stats in sysfs')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
985ef4dcf9
commit
f9d460b341
@ -1477,7 +1477,7 @@ xfs_fs_fill_super(
|
||||
/* Allocate stats memory before we do operations that might use it */
|
||||
mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
|
||||
if (!mp->m_stats.xs_stats) {
|
||||
error = PTR_ERR(mp->m_stats.xs_stats);
|
||||
error = -ENOMEM;
|
||||
goto out_destroy_counters;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user