mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Always use nd.ni_vp->v_mount as an argument for VFS_QUOTACTL(), just like
in RELENG_4. Pointed out by: Alex Lyashkov <umka@sevinter.net>
This commit is contained in:
parent
2aebb586db
commit
6c0ad4a77a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128659
@ -183,7 +183,7 @@ quotactl(td, uap)
|
||||
caddr_t arg;
|
||||
} */ *uap;
|
||||
{
|
||||
struct mount *mp;
|
||||
struct mount *mp, *vmp;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
||||
@ -193,14 +193,13 @@ quotactl(td, uap)
|
||||
if ((error = namei(&nd)) != 0)
|
||||
return (error);
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
error = vn_start_write(nd.ni_vp, &mp, V_WAIT | PCATCH);
|
||||
error = vn_start_write(nd.ni_vp, &vmp, V_WAIT | PCATCH);
|
||||
mp = nd.ni_vp->v_mount;
|
||||
vrele(nd.ni_vp);
|
||||
if (error)
|
||||
return (error);
|
||||
if (mp == NULL)
|
||||
return (EOPNOTSUPP);
|
||||
error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, td);
|
||||
vn_finished_write(mp);
|
||||
vn_finished_write(vmp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ quotactl(td, uap)
|
||||
caddr_t arg;
|
||||
} */ *uap;
|
||||
{
|
||||
struct mount *mp;
|
||||
struct mount *mp, *vmp;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
|
||||
@ -193,14 +193,13 @@ quotactl(td, uap)
|
||||
if ((error = namei(&nd)) != 0)
|
||||
return (error);
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
error = vn_start_write(nd.ni_vp, &mp, V_WAIT | PCATCH);
|
||||
error = vn_start_write(nd.ni_vp, &vmp, V_WAIT | PCATCH);
|
||||
mp = nd.ni_vp->v_mount;
|
||||
vrele(nd.ni_vp);
|
||||
if (error)
|
||||
return (error);
|
||||
if (mp == NULL)
|
||||
return (EOPNOTSUPP);
|
||||
error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, td);
|
||||
vn_finished_write(mp);
|
||||
vn_finished_write(vmp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user