MFC r260706: zfs_deleteextattr: name buffer from namei is needed by zfs_remove

This commit is contained in:
avg 2014-02-17 17:27:52 +00:00
parent 51714698c3
commit 1aeb2280bb

View File

@ -6745,14 +6745,16 @@ vop_deleteextattr {
UIO_SYSSPACE, attrname, xvp, td);
error = namei(&nd);
vp = nd.ni_vp;
NDFREE(&nd, NDF_ONLY_PNBUF);
if (error != 0) {
ZFS_EXIT(zfsvfs);
NDFREE(&nd, NDF_ONLY_PNBUF);
if (error == ENOENT)
error = ENOATTR;
return (error);
}
error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd);
NDFREE(&nd, NDF_ONLY_PNBUF);
vput(nd.ni_dvp);
if (vp == nd.ni_dvp)