Whamcloud - gitweb
LU-3411 osd: fsfilt_get_ops returns an error, not NULL
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Thu, 30 May 2013 11:23:02 +0000 (15:23 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 6 Jun 2013 18:30:12 +0000 (14:30 -0400)
osd_mount() should be able to recognize this properly.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ife1f52cf264fd6041dfc01606c6e48e47f2f8ff0
Reviewed-on: http://review.whamcloud.com/6496
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/osd-ldiskfs/osd_handler.c

index bc52d58..d365a79 100644 (file)
@@ -5306,11 +5306,12 @@ static int osd_mount(const struct lu_env *env,
                RETURN(-E2BIG);
        strcpy(o->od_mntdev, dev);
 
-        o->od_fsops = fsfilt_get_ops(mt_str(LDD_MT_LDISKFS));
-        if (o->od_fsops == NULL) {
-                CERROR("Can't find fsfilt_ldiskfs\n");
-                RETURN(-ENOTSUPP);
-        }
+       o->od_fsops = fsfilt_get_ops(mt_str(LDD_MT_LDISKFS));
+       if (IS_ERR(o->od_fsops)) {
+               CERROR("%s: Can't find fsfilt_ldiskfs\n", name);
+               o->od_fsops = NULL;
+               RETURN(-ENOTSUPP);
+       }
 
        OBD_PAGE_ALLOC(__page, CFS_ALLOC_STD);
        if (__page == NULL)