mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Busy filesystem around call of VFS_QUOTACTL() vfs op.
Tested by: Peter Holm Reviewed by: tegge Approved by: re (kensmith)
This commit is contained in:
parent
c4bbe0e7f4
commit
71d49316cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167540
@ -176,7 +176,7 @@ quotactl(td, uap)
|
||||
caddr_t arg;
|
||||
} */ *uap;
|
||||
{
|
||||
struct mount *mp, *vmp;
|
||||
struct mount *mp;
|
||||
int vfslocked;
|
||||
int error;
|
||||
struct nameidata nd;
|
||||
@ -191,14 +191,15 @@ quotactl(td, uap)
|
||||
return (error);
|
||||
vfslocked = NDHASGIANT(&nd);
|
||||
NDFREE(&nd, NDF_ONLY_PNBUF);
|
||||
error = vn_start_write(nd.ni_vp, &vmp, V_WAIT | PCATCH);
|
||||
mp = nd.ni_vp->v_mount;
|
||||
if ((error = vfs_busy(mp, 0, NULL, td))) {
|
||||
vrele(nd.ni_vp);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
return (error);
|
||||
}
|
||||
vrele(nd.ni_vp);
|
||||
if (error)
|
||||
goto out;
|
||||
error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, td);
|
||||
vn_finished_write(vmp);
|
||||
out:
|
||||
vfs_unbusy(mp, td);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user