diff options
author | Nathan Scott <nathans@sgi.com> | 2006-01-16 15:54:05 +1100 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-16 15:54:05 +1100 |
commit | 54245702ab63a9a0b1ccf78bc37b57e778bb3bcc (patch) | |
tree | 4ff4feac3de44fae6bc7bad062454d475c29570f /fs/xfs | |
parent | 0238cb4e7583c521bb3538060f98a73e65f61324 (diff) | |
download | linux-54245702ab63a9a0b1ccf78bc37b57e778bb3bcc.tar.bz2 |
[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>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 4bd3d03b23ed..521bf3834b43 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -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; } |