Look out! vn_start_write() is able to return 0 and NULL 'mp'.

Submitted by:	Alex Lyashkov <shadow@psoft.net>
This commit is contained in:
Pawel Jakub Dawidek 2004-04-22 15:40:27 +00:00
parent 22391e1540
commit 0c0c597faa
2 changed files with 4 additions and 0 deletions

View File

@ -197,6 +197,8 @@ quotactl(td, uap)
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);
return (error);

View File

@ -197,6 +197,8 @@ quotactl(td, uap)
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);
return (error);