From: Nathan Scott Date: Mon, 16 Jan 2006 04:54:05 +0000 (+1100) Subject: [XFS] Fix symlink creation too, with respect to initialising SELinux X-Git-Tag: v2.6.16-rc1~96^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54245702ab63a9a0b1ccf78bc37b57e778bb3bcc;p=linux-2.6 [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 --- diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 4bd3d03b23..521bf3834b 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; }