diff options
author | kib <kib@FreeBSD.org> | 2008-08-10 12:15:36 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-08-10 12:15:36 +0000 |
commit | ca3c43733a9c7601948f6eca7a9ee452de1789f4 (patch) | |
tree | 97c39a889fedbe8454c218b66ec8a9ee8bea1983 /sys | |
parent | 7b638af8acb02ec4fb6007a3c7959c076391077f (diff) | |
download | FreeBSD-src-ca3c43733a9c7601948f6eca7a9ee452de1789f4.zip FreeBSD-src-ca3c43733a9c7601948f6eca7a9ee452de1789f4.tar.gz |
Revert r181345.
Move the NULL pointer check to the vfs_deleteopt() function.
Discussed with: rodrigc
MFC after: 3 days
Diffstat (limited to 'sys')
-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); |