diff options
author | tjr <tjr@FreeBSD.org> | 2002-12-13 10:15:01 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-12-13 10:15:01 +0000 |
commit | 99f5994bb49ce0f6ac7f141db1b8806a6dd4a164 (patch) | |
tree | d6829a6b64cab3c4fd5bcf0cfade2c79d258fadd /sys/fs/smbfs/smbfs_smb.c | |
parent | 0d70b124724057274d505584b615ff6d73891ac7 (diff) | |
download | FreeBSD-src-99f5994bb49ce0f6ac7f141db1b8806a6dd4a164.zip FreeBSD-src-99f5994bb49ce0f6ac7f141db1b8806a6dd4a164.tar.gz |
Store a reference to the parent directory's vnode in struct smbnode,
not to the parent's smbnode, which may be freed during the lifetime
of the child if the mount is forcibly unmounted. umount -f should now
work properly (ie. not panic) on smbfs mounts.
Diffstat (limited to 'sys/fs/smbfs/smbfs_smb.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_smb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c index da4a871..cd85cbd 100644 --- a/sys/fs/smbfs/smbfs_smb.c +++ b/sys/fs/smbfs/smbfs_smb.c @@ -1485,7 +1485,8 @@ smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen, error = smbfs_smb_lookup(dnp, NULL, 0, fap, scred); return error; } else if (nmlen == 2 && name[0] == '.' && name[1] == '.') { - error = smbfs_smb_lookup(dnp->n_parent, NULL, 0, fap, scred); + error = smbfs_smb_lookup(VTOSMB(dnp->n_parent), NULL, 0, fap, + scred); printf("%s: knows NOTHING about '..'\n", __func__); return error; } |