diff options
-rw-r--r-- | sys/kern/vfs_mount.c | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index dc0cf8c..906ea18 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -192,6 +192,8 @@ vfs_deleteopt(struct vfsoptlist *opts, const char *name) { struct vfsopt *opt, *temp; + if (opts == NULL) + return; TAILQ_FOREACH_SAFE(opt, opts, link, temp) { if (strcmp(opt->name, name) == 0) vfs_freeopt(opts, opt); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 4d9754e..5ee123a 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -169,8 +169,7 @@ ffs_mount(struct mount *mp, struct thread *td) * persist "snapshot" in the options list. */ vfs_deleteopt(mp->mnt_optnew, "snapshot"); - if (mp->mnt_opt != NULL) - vfs_deleteopt(mp->mnt_opt, "snapshot"); + vfs_deleteopt(mp->mnt_opt, "snapshot"); } MNT_ILOCK(mp); |