Commit 4baba809 authored by Stephen Lord's avatar Stephen Lord

[XFS] fix sign of error return in mount update and statfs operations,

mount update could have returned either sign, and statfs was 
just wrong.

SGI Modid: 2.5.x-xfs:slinx:150137a
parent 0b59b42f
......@@ -483,7 +483,7 @@ linvfs_statfs(
int error;
VFS_STATVFS(vfsp, statp, NULL, error);
return error;
return -error;
}
STATIC int
......@@ -500,7 +500,7 @@ linvfs_remount(
if (!error)
VFS_MNTUPDATE(vfsp, flags, args, error);
kmem_free(args, sizeof(*args));
return error;
return -error;
}
STATIC void
......
......@@ -1619,7 +1619,7 @@ xfs_parseargs(
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_LOGBUFS);
return -EINVAL;
return EINVAL;
}
args->logbufs = simple_strtoul(value, &eov, 10);
} else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) {
......@@ -1628,7 +1628,7 @@ xfs_parseargs(
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_LOGBSIZE);
return -EINVAL;
return EINVAL;
}
last = strlen(value) - 1;
if (value[last] == 'K' || value[last] == 'k') {
......@@ -1642,28 +1642,28 @@ xfs_parseargs(
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_LOGDEV);
return -EINVAL;
return EINVAL;
}
strncpy(args->logname, value, MAXNAMELEN);
} else if (!strcmp(this_char, MNTOPT_MTPT)) {
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_MTPT);
return -EINVAL;
return EINVAL;
}
strncpy(args->mtpt, value, MAXNAMELEN);
} else if (!strcmp(this_char, MNTOPT_RTDEV)) {
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_RTDEV);
return -EINVAL;
return EINVAL;
}
strncpy(args->rtname, value, MAXNAMELEN);
} else if (!strcmp(this_char, MNTOPT_BIOSIZE)) {
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_BIOSIZE);
return -EINVAL;
return EINVAL;
}
iosize = simple_strtoul(value, &eov, 10);
args->flags |= XFSMNT_IOSIZE;
......@@ -1679,7 +1679,7 @@ xfs_parseargs(
#ifndef XFS_BIG_FILESYSTEMS
printk("XFS: %s option not allowed on this system\n",
MNTOPT_INO64);
return -EINVAL;
return EINVAL;
#endif
} else if (!strcmp(this_char, MNTOPT_NOALIGN)) {
args->flags |= XFSMNT_NOALIGN;
......@@ -1687,14 +1687,14 @@ xfs_parseargs(
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_SUNIT);
return -EINVAL;
return EINVAL;
}
dsunit = simple_strtoul(value, &eov, 10);
} else if (!strcmp(this_char, MNTOPT_SWIDTH)) {
if (!value || !*value) {
printk("XFS: %s option requires an argument\n",
MNTOPT_SWIDTH);
return -EINVAL;
return EINVAL;
}
dswidth = simple_strtoul(value, &eov, 10);
} else if (!strcmp(this_char, MNTOPT_NOUUID)) {
......@@ -1708,33 +1708,33 @@ printk("XFS: osyncisdsync is now the default, option is deprecated.\n");
printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n");
} else {
printk("XFS: unknown mount option [%s].\n", this_char);
return -EINVAL;
return EINVAL;
}
}
if (args->flags & XFSMNT_NORECOVERY) {
if ((vfsp->vfs_flag & VFS_RDONLY) == 0) {
printk("XFS: no-recovery mounts must be read-only.\n");
return -EINVAL;
return EINVAL;
}
}
if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) {
printk(
"XFS: sunit and swidth options incompatible with the noalign option\n");
return -EINVAL;
return EINVAL;
}
if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
printk("XFS: sunit and swidth must be specified together\n");
return -EINVAL;
return EINVAL;
}
if (dsunit && (dswidth % dsunit != 0)) {
printk(
"XFS: stripe width (%d) must be a multiple of the stripe unit (%d)\n",
dswidth, dsunit);
return -EINVAL;
return EINVAL;
}
if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment