From 1f63b38d2a45071d30ba499bf631b60a6f25d484 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Sat, 17 Aug 2013 20:22:01 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_SECURITY_PLUG test Only the SLES 10 kernel took a vfsmount for various vfs operations to support AppArmor before the path variants were available. We can remove the test and the dead code. Signed-off-by: Jeff Mahoney Signed-off-by: James Simmons Change-Id: I5d4b1c1c9c4994582c51c39ef3b7375b2e0997d3 Reviewed-on: http://review.whamcloud.com/5360 Tested-by: Maloo Tested-by: Hudson Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 19 ------------------- lustre/include/linux/lustre_compat25.h | 25 ------------------------- lustre/lvfs/lvfs_linux.c | 3 +-- lustre/obdclass/llog_lvfs.c | 2 +- lustre/osd-ldiskfs/osd_compat.c | 4 ++-- 5 files changed, 4 insertions(+), 49 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index a073602..13f492c 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -440,24 +440,6 @@ LB_LINUX_TRY_COMPILE([ # 2.6.27 # -# LC_SECURITY_PLUG # for SLES10 SP2 (2.6.27) -# check security plug in sles10 sp2 kernel -AC_DEFUN([LC_SECURITY_PLUG], -[AC_MSG_CHECKING([If kernel has security plug support]) -LB_LINUX_TRY_COMPILE([ - #include - #include -],[ - notify_change(NULL, NULL, NULL); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SECURITY_PLUG, 1, - [SLES10 SP2 use extra parameter in vfs]) -],[ - AC_MSG_RESULT(no) -]) -]) - AC_DEFUN([LC_INODE_PERMISION_2ARGS], [AC_MSG_CHECKING([inode_operations->permission has two args]) LB_LINUX_TRY_COMPILE([ @@ -1451,7 +1433,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_PROCFS_DELETED # 2.6.27 - LC_SECURITY_PLUG # for SLES10 SP2 LC_INODE_PERMISION_2ARGS LC_QUOTA_ON_5ARGS LC_QUOTA_OFF_3ARGS diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 38cbedd..bc510d8 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -120,10 +120,6 @@ static inline struct file *ll_dentry_open(struct path *path, int flags, } #endif -#ifdef HAVE_SECURITY_PLUG -#define ll_vfs_symlink(dir, dentry, mnt, path, mode) \ - vfs_symlink(dir, dentry, mnt, path, mode) -#else #ifdef HAVE_4ARGS_VFS_SYMLINK #define ll_vfs_symlink(dir, dentry, mnt, path, mode) \ vfs_symlink(dir, dentry, path, mode) @@ -132,8 +128,6 @@ static inline struct file *ll_dentry_open(struct path *path, int flags, vfs_symlink(dir, dentry, path) #endif -#endif - #if !defined(HAVE_FILE_LLSEEK_SIZE) || defined(HAVE_FILE_LLSEEK_SIZE_5ARGS) #define ll_generic_file_llseek_size(file, offset, origin, maxbytes, eof) \ generic_file_llseek_size(file, offset, origin, maxbytes, eof); @@ -237,25 +231,6 @@ unsigned int ll_crypto_tfm_alg_min_keysize(struct crypto_blkcipher *tfm) #define ll_crypto_free_hash(tfm) crypto_free_hash(tfm) #define ll_crypto_free_blkcipher(tfm) crypto_free_blkcipher(tfm) -#ifdef HAVE_SECURITY_PLUG -#define ll_vfs_rmdir(dir,entry,mnt) vfs_rmdir(dir,entry,mnt) -#define ll_vfs_mkdir(inode,dir,mnt,mode) vfs_mkdir(inode,dir,mnt,mode) -#define ll_vfs_link(old,mnt,dir,new,mnt1) vfs_link(old,mnt,dir,new,mnt1) -#define ll_vfs_unlink(inode,entry,mnt) vfs_unlink(inode,entry,mnt) -#define ll_vfs_mknod(dir,entry,mnt,mode,dev) \ - vfs_mknod(dir,entry,mnt,mode,dev) -#define ll_vfs_rename(old,old_dir,mnt,new,new_dir,mnt1) \ - vfs_rename(old,old_dir,mnt,new,new_dir,mnt1) -#else -#define ll_vfs_rmdir(dir,entry,mnt) vfs_rmdir(dir,entry) -#define ll_vfs_mkdir(inode,dir,mnt,mode) vfs_mkdir(inode,dir,mode) -#define ll_vfs_link(old,mnt,dir,new,mnt1) vfs_link(old,dir,new) -#define ll_vfs_unlink(inode,entry,mnt) vfs_unlink(inode,entry) -#define ll_vfs_mknod(dir,entry,mnt,mode,dev) vfs_mknod(dir,entry,mode,dev) -#define ll_vfs_rename(old,old_dir,mnt,new,new_dir,mnt1) \ - vfs_rename(old,old_dir,new,new_dir) -#endif /* HAVE_SECURITY_PLUG */ - #ifdef for_each_possible_cpu #define cfs_for_each_possible_cpu(cpu) for_each_possible_cpu(cpu) #elif defined(for_each_cpu) diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c index cf5f424..a5d92d1 100644 --- a/lustre/lvfs/lvfs_linux.c +++ b/lustre/lvfs/lvfs_linux.c @@ -223,8 +223,7 @@ int lustre_rename(struct dentry *dir, struct vfsmount *mnt, if (IS_ERR(dchild_new)) GOTO(put_old, err = PTR_ERR(dchild_new)); - err = ll_vfs_rename(dir->d_inode, dchild_old, mnt, - dir->d_inode, dchild_new, mnt); + err = vfs_rename(dir->d_inode, dchild_old, dir->d_inode, dchild_new); dput(dchild_new); put_old: diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index a83cb6f..a2c819c 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -791,7 +791,7 @@ static int llog_lvfs_destroy(const struct lu_env *env, rc = llog_lvfs_close(env, handle); if (rc == 0) { mutex_lock_nested(&inode->i_mutex, I_MUTEX_PARENT); - rc = ll_vfs_unlink(inode, fdentry, mnt); + rc = vfs_unlink(inode, fdentry); mutex_unlock(&inode->i_mutex); } mntput(mnt); diff --git a/lustre/osd-ldiskfs/osd_compat.c b/lustre/osd-ldiskfs/osd_compat.c index a12c4e7..f86da33 100644 --- a/lustre/osd-ldiskfs/osd_compat.c +++ b/lustre/osd-ldiskfs/osd_compat.c @@ -112,7 +112,7 @@ static struct dentry *simple_mkdir(struct dentry *dir, struct vfsmount *mnt, GOTO(out_up, dchild); } - err = ll_vfs_mkdir(dir->d_inode, dchild, mnt, mode); + err = vfs_mkdir(dir->d_inode, dchild, mode); if (err) GOTO(out_err, err); @@ -1124,7 +1124,7 @@ int osd_obj_map_recover(struct osd_thread_info *info, /* If the src object has never been modified, then remove it. */ if (inode->i_size == 0 && inode->i_mode & S_ISUID && inode->i_mode & S_ISGID) - ll_vfs_unlink(src_parent, src_child, osd->od_mnt); + vfs_unlink(src_parent, src_child); GOTO(unlock_src, rc = 0); } -- 1.8.3.1