From 54245702ab63a9a0b1ccf78bc37b57e778bb3bcc Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 16 Jan 2006 15:54:05 +1100 Subject: [PATCH 1/3] [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 --- fs/xfs/linux-2.6/xfs_iops.c | 13 ++++++++----- 1 file 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; } From c2e81432201d99cc48ff6492567fe05204cc8d7e Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 16 Jan 2006 16:21:34 +1100 Subject: [PATCH 2/3] [XFS] mutex fallout - fix debug builds and remove no-longer-useful comment. Signed-off-by: Nathan Scott --- fs/xfs/linux-2.6/mutex.h | 12 +----------- fs/xfs/quota/xfs_qm.c | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/fs/xfs/linux-2.6/mutex.h b/fs/xfs/linux-2.6/mutex.h index d3369b6ca168..2a88d56c4dc2 100644 --- a/fs/xfs/linux-2.6/mutex.h +++ b/fs/xfs/linux-2.6/mutex.h @@ -18,18 +18,8 @@ #ifndef __XFS_SUPPORT_MUTEX_H__ #define __XFS_SUPPORT_MUTEX_H__ -#include #include -/* - * Map the mutex'es from IRIX to Linux semaphores. - * - * Destroy just simply initializes to -99 which should block all other - * callers. - */ -#define MUTEX_DEFAULT 0x0 - -typedef struct mutex mutex_t; -//#define mutex_destroy(lock) do{}while(0) +typedef struct mutex mutex_t; #endif /* __XFS_SUPPORT_MUTEX_H__ */ diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index 7dcdd0640c32..3384bfefee5b 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -167,7 +167,7 @@ xfs_Gqm_init(void) xqm->qm_dqfree_ratio = XFS_QM_DQFREE_RATIO; xqm->qm_nrefs = 0; #ifdef DEBUG - xfs_mutex_init(&qcheck_lock, MUTEX_DEFAULT, "qchk"); + mutex_init(&qcheck_lock); #endif return xqm; } From 107a09c44b65d5e2a5313edfda91c498df3b3f2a Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 16 Jan 2006 16:28:07 +1100 Subject: [PATCH 3/3] [XFS] remove no-longer-needed IS_NOATIME macro, twas just a build workaround Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott --- fs/xfs/linux-2.6/xfs_iops.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 521bf3834b43..76c6df34d0db 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -56,9 +56,6 @@ #include #include -#define IS_NOATIME(inode) ((inode->i_sb->s_flags & MS_NOATIME) || \ - (S_ISDIR(inode->i_mode) && inode->i_sb->s_flags & MS_NODIRATIME)) - /* * Get a XFS inode from a given vnode. */