1
0
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:
Pawel Jakub Dawidek 2004-04-26 15:44:42 +00:00
parent 2aebb586db
commit 6c0ad4a77a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128659
2 changed files with 8 additions and 10 deletions

View File

@ -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);
}

View File

@ -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);
}