smbfs_vfsops.c (103936) | smbfs_vfsops.c (107842) |
---|---|
1/* 2 * Copyright (c) 2000-2001, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000-2001, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vfsops.c 103936 2002-09-25 02:32:42Z jeff $ | 32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vfsops.c 107842 2002-12-13 23:44:00Z tjr $ |
33 */ 34#include "opt_netsmb.h" 35#ifndef NETSMB 36#error "SMBFS requires option NETSMB" 37#endif 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 197 unchanged lines hidden (view full) --- 238 struct smbmount *smp = VFSTOSMBFS(mp); 239 struct smb_cred scred; 240 int error, flags; 241 242 SMBVDEBUG("smbfs_unmount: flags=%04x\n", mntflags); 243 flags = 0; 244 if (mntflags & MNT_FORCE) 245 flags |= FORCECLOSE; | 33 */ 34#include "opt_netsmb.h" 35#ifndef NETSMB 36#error "SMBFS requires option NETSMB" 37#endif 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 197 unchanged lines hidden (view full) --- 238 struct smbmount *smp = VFSTOSMBFS(mp); 239 struct smb_cred scred; 240 int error, flags; 241 242 SMBVDEBUG("smbfs_unmount: flags=%04x\n", mntflags); 243 flags = 0; 244 if (mntflags & MNT_FORCE) 245 flags |= FORCECLOSE; |
246 /* There is 1 extra root vnode reference from smbfs_mount(). */ 247 error = vflush(mp, 1, flags); | 246 /* 247 * Keep trying to flush the vnode list for the mount while 248 * some are still busy and we are making progress towards 249 * making them not busy. This is needed because smbfs vnodes 250 * reference their parent directory but may appear after their 251 * parent in the list; one pass over the vnode list is not 252 * sufficient in this case. 253 */ 254 do { 255 smp->sm_didrele = 0; 256 /* There is 1 extra root vnode reference from smbfs_mount(). */ 257 error = vflush(mp, 1, flags); 258 } while (error == EBUSY && smp->sm_didrele != 0); |
248 if (error) 249 return error; 250 smb_makescred(&scred, td, td->td_ucred); 251 smb_share_put(smp->sm_share, &scred); 252 mp->mnt_data = (qaddr_t)0; 253 254 if (smp->sm_hash) 255 free(smp->sm_hash, M_SMBFSHASH); --- 193 unchanged lines hidden --- | 259 if (error) 260 return error; 261 smb_makescred(&scred, td, td->td_ucred); 262 smb_share_put(smp->sm_share, &scred); 263 mp->mnt_data = (qaddr_t)0; 264 265 if (smp->sm_hash) 266 free(smp->sm_hash, M_SMBFSHASH); --- 193 unchanged lines hidden --- |