Whamcloud - gitweb
LU-7354 osd: avoid NULL pointer in osd_obj_update_entry
[fs/lustre-release.git] / lustre / utils / mount_utils_ldiskfs.c
index 6bc37a2..4f6b84c 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -262,7 +262,8 @@ int ldiskfs_write_ldd(struct mkfs_opts *mop)
                dev = mop->mo_loopdev;
 
        ret = mount(dev, mntpt, MT_STR(&mop->mo_ldd), 0,
-                   mop->mo_ldd.ldd_mount_opts);
+               (mop->mo_mountopts == NULL) ?
+               "errors=remount-ro" : mop->mo_mountopts);
        if (ret) {
                fprintf(stderr, "%s: Unable to mount %s: %s\n",
                        progname, dev, strerror(errno));