Unconditionally mount a CD9660 filesystem as read-only, instead of

returning EROFS if we forget to mount it as read-only.
This commit is contained in:
Craig Rodrigues 2005-10-17 03:29:53 +00:00
parent b137e1c8ba
commit c583f369a7
2 changed files with 8 additions and 4 deletions

View File

@ -135,8 +135,10 @@ cd9660_mount(struct mount *mp, struct thread *td)
struct nameidata ndp;
struct iso_mnt *imp = 0;
if ((mp->mnt_flag & MNT_RDONLY) == 0)
return (EROFS);
/*
* Unconditionally mount as read-only.
*/
mp->mnt_flag |= MNT_RDONLY;
fspec = vfs_getopts(mp->mnt_optnew, "from", &error);
if (error)

View File

@ -135,8 +135,10 @@ cd9660_mount(struct mount *mp, struct thread *td)
struct nameidata ndp;
struct iso_mnt *imp = 0;
if ((mp->mnt_flag & MNT_RDONLY) == 0)
return (EROFS);
/*
* Unconditionally mount as read-only.
*/
mp->mnt_flag |= MNT_RDONLY;
fspec = vfs_getopts(mp->mnt_optnew, "from", &error);
if (error)