Commit 54245702 authored by Nathan Scott's avatar Nathan Scott

[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: default avatarNathan Scott <nathans@sgi.com>
parent 0238cb4e
...@@ -474,11 +474,14 @@ linvfs_symlink( ...@@ -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)) {
error = linvfs_init_security(cvp, dir);
if (likely(!error)) {
ip = LINVFS_GET_IP(cvp); ip = LINVFS_GET_IP(cvp);
d_instantiate(dentry, ip); d_instantiate(dentry, ip);
validate_fields(dir); validate_fields(dir);
validate_fields(ip); /* size needs update */ validate_fields(ip);
}
} }
return -error; return -error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment