freebsd: Correct the order of arguments to copyin() for Q_SETQUOTA

Sponsored by: DARPA
External-issue: https://reviews.freebsd.org/D24656
FreeBSD-commit: freebsd/freebsd@a431c095d3

Authored by: jhb <jhb@FreeBSD.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10344
This commit is contained in:
Ryan Moeller 2020-05-19 19:45:25 -04:00 committed by GitHub
parent 7cd723e685
commit 7b0e39030c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ zfs_quotactl(vfs_t *vfsp, int cmds, uid_t id, void *arg)
vfs_unbusy(vfsp);
break;
case Q_SETQUOTA:
error = copyin(&dqblk, arg, sizeof (dqblk));
error = copyin(arg, &dqblk, sizeof (dqblk));
if (error == 0)
error = zfs_set_userquota(zfsvfs, quota_type,
"", id, dbtob(dqblk.dqb_bhardlimit));