Whamcloud - gitweb
land v0.9.1 on HEAD, in preparation for a 1.0.x branch
[fs/lustre-release.git] / lustre / osc / osc_lib.c
index c8cd6ad..79b4b6b 100644 (file)
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#define EXPORT_SYMTAB
+#ifndef EXPORT_SYMTAB
+# define EXPORT_SYMTAB
+#endif
 #define DEBUG_SUBSYSTEM S_OSC
 
 #ifdef __KERNEL__
@@ -28,6 +30,8 @@
 # include <linux/obd_ost.h>
 # include <linux/lustre_net.h>
 # include <linux/lustre_dlm.h>
+# include <linux/lustre_lib.h>
+# include <linux/lustre_compat25.h>
 
 /* convert a pathname into a kdev_t */
 static kdev_t path2dev(char *path)
@@ -36,11 +40,8 @@ static kdev_t path2dev(char *path)
         struct nameidata nd;
         kdev_t dev = KDEVT_INIT(0);
 
-        if (!path_init(path, LOOKUP_FOLLOW, &nd))
-                return 0;
-
-        if (path_walk(path, &nd))
-                return 0;
+        if (ll_path_lookup(path, LOOKUP_FOLLOW, &nd))
+                return val_to_kdev(0);
 
         dentry = nd.dentry;
         if (dentry->d_inode && !is_bad_inode(dentry->d_inode) &&
@@ -53,20 +54,20 @@ static kdev_t path2dev(char *path)
 
 int client_sanobd_setup(struct obd_device *obddev, obd_count len, void *buf)
 {
-        struct obd_ioctl_data* data = buf;
+        struct lustre_cfg* lcfg = buf;
         struct client_obd *cli = &obddev->u.cli;
         ENTRY;
 
-        if (data->ioc_inllen3 < 1) {
+        if (lcfg->lcfg_inllen3 < 1) {
                 CERROR("setup requires a SAN device pathname\n");
                 RETURN(-EINVAL);
         }
 
         client_obd_setup(obddev, len, buf);
 
-        cli->cl_sandev = path2dev(data->ioc_inlbuf3);
+        cli->cl_sandev = path2dev(lcfg->lcfg_inlbuf3);
         if (!kdev_t_to_nr(cli->cl_sandev)) {
-                CERROR("%s seems not a valid SAN device\n", data->ioc_inlbuf3);
+                CERROR("%s seems not a valid SAN device\n", lcfg->lcfg_inlbuf3);
                 RETURN(-EINVAL);
         }