summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_iops.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-01-16 15:54:05 +1100
committerNathan Scott <nathans@sgi.com>2006-01-16 15:54:05 +1100
commit54245702ab63a9a0b1ccf78bc37b57e778bb3bcc (patch)
tree4ff4feac3de44fae6bc7bad062454d475c29570f /fs/xfs/linux-2.6/xfs_iops.c
parent0238cb4e7583c521bb3538060f98a73e65f61324 (diff)
downloadop-kernel-dev-54245702ab63a9a0b1ccf78bc37b57e778bb3bcc.zip
op-kernel-dev-54245702ab63a9a0b1ccf78bc37b57e778bb3bcc.tar.gz
[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/linux-2.6/xfs_iops.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c13
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 4bd3d03..521bf38 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;
}
OpenPOWER on IntegriCloud