[XFS] Fix symlink creation too, with respect to initialising SELinux
context. SGI-PV: 946762 SGI-Modid: xfs-linux-melb:xfs-kern:24983a Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
parent
0238cb4e75
commit
54245702ab
|
@ -474,11 +474,14 @@ linvfs_symlink(
|
||||||
|
|
||||||
error = 0;
|
error = 0;
|
||||||
VOP_SYMLINK(dvp, dentry, &va, (char *)symname, &cvp, NULL, error);
|
VOP_SYMLINK(dvp, dentry, &va, (char *)symname, &cvp, NULL, error);
|
||||||
if (!error && cvp) {
|
if (likely(!error && cvp)) {
|
||||||
ip = LINVFS_GET_IP(cvp);
|
error = linvfs_init_security(cvp, dir);
|
||||||
d_instantiate(dentry, ip);
|
if (likely(!error)) {
|
||||||
validate_fields(dir);
|
ip = LINVFS_GET_IP(cvp);
|
||||||
validate_fields(ip); /* size needs update */
|
d_instantiate(dentry, ip);
|
||||||
|
validate_fields(dir);
|
||||||
|
validate_fields(ip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return -error;
|
return -error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue