From 09c549199bd5c866f0b56edbe914623cfd34f0cd Mon Sep 17 00:00:00 2001 From: adilger Date: Thu, 24 Oct 2002 21:30:22 +0000 Subject: [PATCH] Don't oops if data->ioc_inlbuf1 is not set. --- lustre/obdclass/class_obd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index 6d67c32..af17bf7 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -777,8 +777,8 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, CERROR("OBD device %d not attached\n", obd->obd_minor); GOTO(out, err=-ENODEV); } - if (!list_empty(&obd->obd_exports) ) { - if (data->ioc_inlbuf1[0] != 'F') { + if (!list_empty(&obd->obd_exports)) { + if (!data->ioc_inlbuf1 || data->ioc_inlbuf1[0] != 'F') { CERROR("OBD device %d (%p) has exports\n", obd->obd_minor, obd); GOTO(out, err=-EBUSY); -- 1.8.3.1