smb_vfs.c revision faa1795a28a5c712eed6d0a3f84d98c368a316c6
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <smbsrv/smb_incl.h>
#include <smbsrv/smb_fsops.h>
/*
* smb_vfs_hold
*
* Increments the reference count of the fs passed in. If no smb_vfs_t structure
* has been created yet for the fs passed in it is created.
*/
{
return (B_FALSE);
if (smb_vfs) {
return (B_TRUE);
}
/*
* We have a hold on the root vnode of the file system
* from the VFS_ROOT call above.
*/
return (B_TRUE);
}
/*
* smb_vfs_rele
*
* Decrements the reference count of the fs passed in. If the reference count
* drops to zero the smb_vfs_t structure associated with the fs is freed.
*/
void
{
return;
if (smb_vfs) {
return;
}
}
}
/*
* smb_vfs_rele_all()
*
* Release all holds on root vnodes of file systems which were taken
* due to the existence of at least one enabled share on the file system.
* Called at driver close time.
*/
void
{
}
}
/*
* smb_vfs_lookup
*
* Goes through the list of smb_vfs_t structure and returns the one matching
* the vnode passed in. If no match is found a NULL pointer is returned.
*
* The list of smb_vfs_t structures has to have been entered prior calling
* this function.
*/
static smb_vfs_t *
{
while (smb_vfs) {
return (smb_vfs);
}
}
return (NULL);
}