From 19e544099dfa32b8d020c07f65d8153994c9a33e Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 30 May 2013 15:23:02 +0400 Subject: [PATCH] LU-3411 osd: fsfilt_get_ops returns an error, not NULL osd_mount() should be able to recognize this properly. Signed-off-by: Alex Zhuravlev Change-Id: Ife1f52cf264fd6041dfc01606c6e48e47f2f8ff0 Reviewed-on: http://review.whamcloud.com/6496 Tested-by: Hudson Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Reviewed-by: James Simmons Tested-by: Maloo --- lustre/osd-ldiskfs/osd_handler.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index bc52d58..d365a79 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -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) -- 1.8.3.1