From: Parinay Kondekar <parinay.konde...@seagate.com>

A few pieces still exist for the IOC_LIBCFS_PANIC ioctl. Remove
these last bits to prevent old tools from using them. The latest
lustre utilities no longer use this ioctl.

Signed-off-by: Parinay Kondekar <parinay.konde...@seagate.com>
Signed-off-by: James Simmons <uja.o...@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492
Reviewed-by: Andreas Dilger <andreas.dil...@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.ere...@intel.com>
Reviewed-by: John L. Hammond <john.hamm...@intel.com>
Reviewed-by: Oleg Drokin <oleg.dro...@intel.com>
---
 .../lustre/include/linux/libcfs/libcfs_ioctl.h     |    2 +-
 .../staging/lustre/include/linux/lnet/lnetctl.h    |    1 -
 .../lustre/lustre/libcfs/linux/linux-module.c      |    5 -----
 drivers/staging/lustre/lustre/libcfs/module.c      |    5 +----
 4 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
index ba47cdf..b0d5c78 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
@@ -105,7 +105,7 @@ struct libcfs_ioctl_handler {
 #define IOC_LIBCFS_TYPE                   'e'
 #define IOC_LIBCFS_MIN_NR               30
 /* libcfs ioctls */
-#define IOC_LIBCFS_PANIC                  _IOWR('e', 30, long)
+/* IOC_LIBCFS_PANIC obsolete in 2.8.0, was _IOWR('e', 30, IOCTL_LIBCFS_TYPE) */
 #define IOC_LIBCFS_CLEAR_DEBUG      _IOWR('e', 31, long)
 #define IOC_LIBCFS_MARK_DEBUG        _IOWR('e', 32, long)
 #define IOC_LIBCFS_MEMHOG                _IOWR('e', 36, long)
diff --git a/drivers/staging/lustre/include/linux/lnet/lnetctl.h 
b/drivers/staging/lustre/include/linux/lnet/lnetctl.h
index bdd69b2..b9ec555 100644
--- a/drivers/staging/lustre/include/linux/lnet/lnetctl.h
+++ b/drivers/staging/lustre/include/linux/lnet/lnetctl.h
@@ -74,6 +74,5 @@ int jt_dbg_debug_file(int argc, char **argv);
 int jt_dbg_clear_debug_buf(int argc, char **argv);
 int jt_dbg_mark_debug_buf(int argc, char **argv);
 int jt_dbg_modules(int argc, char **argv);
-int jt_dbg_panic(int argc, char **argv);
 
 #endif
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c 
b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
index 70a99cf..4ade712 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
@@ -147,11 +147,6 @@ static long libcfs_ioctl(struct file *file,
 
        /* Handle platform-dependent IOC requests */
        switch (cmd) {
-       case IOC_LIBCFS_PANIC:
-               if (!capable(CFS_CAP_SYS_BOOT))
-                       return -EPERM;
-               panic("debugctl-invoked panic");
-               return 0;
        case IOC_LIBCFS_MEMHOG:
                if (!capable(CFS_CAP_SYS_ADMIN))
                        return -EPERM;
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c 
b/drivers/staging/lustre/lustre/libcfs/module.c
index 329d78c..1ad67c6 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -250,10 +250,7 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, 
unsigned long cmd,
        case IOC_LIBCFS_CLEAR_DEBUG:
                libcfs_debug_clear_buffer();
                return 0;
-       /*
-        * case IOC_LIBCFS_PANIC:
-        * Handled in arch/cfs_module.c
-        */
+
        case IOC_LIBCFS_MARK_DEBUG:
                if (data->ioc_inlbuf1 == NULL ||
                    data->ioc_inlbuf1[data->ioc_inllen1 - 1] != '\0')
-- 
1.7.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to