summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorDan Carpenter2015-10-18 23:42:47 +0200
committerDave Chinner2015-10-18 23:42:47 +0200
commitf9d460b341f23a9bb7df8868975fdfcc2e71aa9b (patch)
tree18f61dab8211f085b4855e853925948ddbcd2967 /fs/xfs/xfs_super.c
parentxfs: stats are no longer dependent on CONFIG_PROC_FS (diff)
downloadkernel-qcow2-linux-f9d460b341f23a9bb7df8868975fdfcc2e71aa9b.tar.gz
kernel-qcow2-linux-f9d460b341f23a9bb7df8868975fdfcc2e71aa9b.tar.xz
kernel-qcow2-linux-f9d460b341f23a9bb7df8868975fdfcc2e71aa9b.zip
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: 225e4635580c ('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>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 368c55adee9d..b2c252cd7172 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -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;
}