After converting the "snapshot" mount option to the MNT_SNAPSHOT flag,
delete "snapshot" from the persistent mount options list. This should fix problems with doing a mount -o snapshot of a file system, followed by an NFS export of the same file system. PR: 122833 Reported by: Leon Kos <leon.kos lecad fs uni-lj si>, Jaakko Heinonen <jh saunalahti fi> MFC after: 1 month
This commit is contained in:
parent
02a871f1ea
commit
fb77e0af12
@ -162,8 +162,15 @@ ffs_mount(struct mount *mp, struct thread *td)
|
||||
if (vfs_getopt(mp->mnt_optnew, "acls", NULL, NULL) == 0)
|
||||
mntorflags |= MNT_ACLS;
|
||||
|
||||
if (vfs_getopt(mp->mnt_optnew, "snapshot", NULL, NULL) == 0)
|
||||
if (vfs_getopt(mp->mnt_optnew, "snapshot", NULL, NULL) == 0) {
|
||||
mntorflags |= MNT_SNAPSHOT;
|
||||
/*
|
||||
* Once we have set the MNT_SNAPSHOT flag, do not
|
||||
* persist "snapshot" in the options list.
|
||||
*/
|
||||
vfs_deleteopt(mp->mnt_optnew, "snapshot");
|
||||
vfs_deleteopt(mp->mnt_opt, "snapshot");
|
||||
}
|
||||
|
||||
MNT_ILOCK(mp);
|
||||
mp->mnt_flag = (mp->mnt_flag | mntorflags) & ~mntandnotflags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user