提交 54245702 编写于 作者: N 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: NNathan Scott <nathans@sgi.com>
上级 0238cb4e
......@@ -474,11 +474,14 @@ linvfs_symlink(
error = 0;
VOP_SYMLINK(dvp, dentry, &va, (char *)symname, &cvp, NULL, error);
if (!error && cvp) {
ip = LINVFS_GET_IP(cvp);
d_instantiate(dentry, ip);
validate_fields(dir);
validate_fields(ip); /* size needs update */
if (likely(!error && cvp)) {
error = linvfs_init_security(cvp, dir);
if (likely(!error)) {
ip = LINVFS_GET_IP(cvp);
d_instantiate(dentry, ip);
validate_fields(dir);
validate_fields(ip);
}
}
return -error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册