Whamcloud - gitweb
Make the failure testing readonly stuff conditionally compiled based on
authoradilger <adilger>
Mon, 1 Apr 2002 05:55:19 +0000 (05:55 +0000)
committeradilger <adilger>
Mon, 1 Apr 2002 05:55:19 +0000 (05:55 +0000)
whether the kernel has been patched with support for it or not.

lustre/mds/handler.c

index b04c4d0..9f30016 100644 (file)
@@ -441,7 +441,9 @@ static int mds_setup(struct obd_device *obddev, obd_count len, void *buf)
         ENTRY;
 
         MOD_INC_USE_COUNT;
+#ifdef CONFIG_DEV_RDONLY
         dev_clear_rdonly(2);
+#endif
         mnt = do_kern_mount(data->ioc_inlbuf2, 0, data->ioc_inlbuf1, NULL);
         err = PTR_ERR(mnt);
         if (IS_ERR(mnt)) {
@@ -549,7 +551,9 @@ static int mds_cleanup(struct obd_device * obddev)
         mds->mds_sb = 0;
         kfree(mds->mds_fstype);
         lock_kernel();
+#ifdef CONFIG_DEV_RDONLY
         dev_clear_rdonly(2);
+#endif
 
         OBD_FREE(s_ops, sizeof(*s_ops));