Fix automount for root filesystems
Commit 093bb64
resolved an automount failures for chroot'd processes
but inadvertently broke automounting for root filesystems where the
vfs_mntpoint is NULL. Resolve the issue by checking for NULL in order
to generate the correct path.
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9381
Closes #9384
This commit is contained in:
parent
2cc479d049
commit
6bd4f4545d
|
@ -1053,7 +1053,8 @@ zfsctl_snapshot_mount(struct path *path, int flags)
|
|||
* on mount.zfs(8).
|
||||
*/
|
||||
snprintf(full_path, MAXPATHLEN, "%s/.zfs/snapshot/%s",
|
||||
zfsvfs->z_vfs->vfs_mntpoint, dname(dentry));
|
||||
zfsvfs->z_vfs->vfs_mntpoint ? zfsvfs->z_vfs->vfs_mntpoint : "",
|
||||
dname(dentry));
|
||||
|
||||
/*
|
||||
* Multiple concurrent automounts of a snapshot are never allowed.
|
||||
|
|
Loading…
Reference in New Issue