Whamcloud - gitweb
LU-2800 autoconf: remove LC_SECURITY_PLUG test 60/5360/6
authorJames Simmons <uja.ornl@gmail.com>
Sun, 18 Aug 2013 00:22:01 +0000 (20:22 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Sep 2013 05:57:43 +0000 (05:57 +0000)
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 <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I5d4b1c1c9c4994582c51c39ef3b7375b2e0997d3
Reviewed-on: http://review.whamcloud.com/5360
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h
lustre/lvfs/lvfs_linux.c
lustre/obdclass/llog_lvfs.c
lustre/osd-ldiskfs/osd_compat.c

index a073602..13f492c 100644 (file)
@@ -440,24 +440,6 @@ LB_LINUX_TRY_COMPILE([
 # 2.6.27
 #
 
 # 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 <linux/fs.h>
-        #include <linux/stddef.h>
-],[
-        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([
 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_PROCFS_DELETED
 
          # 2.6.27
-         LC_SECURITY_PLUG  # for SLES10 SP2
          LC_INODE_PERMISION_2ARGS
          LC_QUOTA_ON_5ARGS
          LC_QUOTA_OFF_3ARGS
          LC_INODE_PERMISION_2ARGS
          LC_QUOTA_ON_5ARGS
          LC_QUOTA_OFF_3ARGS
index 38cbedd..bc510d8 100644 (file)
@@ -120,10 +120,6 @@ static inline struct file *ll_dentry_open(struct path *path, int flags,
 }
 #endif
 
 }
 #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)
 #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
 
                        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);
 #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)
 
 #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)
 #ifdef for_each_possible_cpu
 #define cfs_for_each_possible_cpu(cpu) for_each_possible_cpu(cpu)
 #elif defined(for_each_cpu)
index cf5f424..a5d92d1 100644 (file)
@@ -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));
 
         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:
 
         dput(dchild_new);
 put_old:
index a83cb6f..a2c819c 100644 (file)
@@ -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 = 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);
                        mutex_unlock(&inode->i_mutex);
                }
                mntput(mnt);
index a12c4e7..f86da33 100644 (file)
@@ -112,7 +112,7 @@ static struct dentry *simple_mkdir(struct dentry *dir, struct vfsmount *mnt,
                GOTO(out_up, dchild);
        }
 
                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);
 
        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)
                /* 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);
        }
 
                GOTO(unlock_src, rc = 0);
        }