Skip to content

Commit

Permalink
[XFS] Fix symlink creation too, with respect to initialising SELinux
Browse files Browse the repository at this point in the history
context.

SGI-PV: 946762
SGI-Modid: xfs-linux-melb:xfs-kern:24983a

Signed-off-by: Nathan Scott <nathans@sgi.com>
  • Loading branch information
Nathan Scott committed Jan 16, 2006
1 parent 0238cb4 commit 5424570
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions fs/xfs/linux-2.6/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5424570

Please sign in to comment.