smbfs_node.c (e2fb7a7be0c688b7b4bdce276aa105e6839bc4d7) | smbfs_node.c (aec0fb7b40e4cf877bea663f2d86dd07c3524fe8) |
---|---|
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 --- 48 unchanged lines hidden (view full) --- 57#include <fs/smbfs/smbfs_node.h> 58#include <fs/smbfs/smbfs_subr.h> 59 60#define SMBFS_NOHASH(smp, hval) (&(smp)->sm_hash[(hval) & (smp)->sm_hashlen]) 61#define smbfs_hash_lock(smp, td) lockmgr(&smp->sm_hashlock, LK_EXCLUSIVE, NULL, td) 62#define smbfs_hash_unlock(smp, td) lockmgr(&smp->sm_hashlock, LK_RELEASE, NULL, td) 63 64 | 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 --- 48 unchanged lines hidden (view full) --- 57#include <fs/smbfs/smbfs_node.h> 58#include <fs/smbfs/smbfs_subr.h> 59 60#define SMBFS_NOHASH(smp, hval) (&(smp)->sm_hash[(hval) & (smp)->sm_hashlen]) 61#define smbfs_hash_lock(smp, td) lockmgr(&smp->sm_hashlock, LK_EXCLUSIVE, NULL, td) 62#define smbfs_hash_unlock(smp, td) lockmgr(&smp->sm_hashlock, LK_RELEASE, NULL, td) 63 64 |
65extern vop_t **smbfs_vnodeop_p; | 65extern struct vop_vector smbfs_vnodeops; /* XXX -> .h file */ |
66 67MALLOC_DEFINE(M_SMBNODE, "SMBFS node", "SMBFS vnode private part"); 68static MALLOC_DEFINE(M_SMBNODENAME, "SMBFS nname", "SMBFS node name"); 69 70int smbfs_hashprint(struct mount *mp); 71 72#if 0 73#ifdef SYSCTL_DECL --- 157 unchanged lines hidden (view full) --- 231 /* 232 * If we don't have node attributes, then it is an explicit lookup 233 * for an existing vnode. 234 */ 235 if (fap == NULL) 236 return ENOENT; 237 238 MALLOC(np, struct smbnode *, sizeof *np, M_SMBNODE, M_WAITOK); | 66 67MALLOC_DEFINE(M_SMBNODE, "SMBFS node", "SMBFS vnode private part"); 68static MALLOC_DEFINE(M_SMBNODENAME, "SMBFS nname", "SMBFS node name"); 69 70int smbfs_hashprint(struct mount *mp); 71 72#if 0 73#ifdef SYSCTL_DECL --- 157 unchanged lines hidden (view full) --- 231 /* 232 * If we don't have node attributes, then it is an explicit lookup 233 * for an existing vnode. 234 */ 235 if (fap == NULL) 236 return ENOENT; 237 238 MALLOC(np, struct smbnode *, sizeof *np, M_SMBNODE, M_WAITOK); |
239 error = getnewvnode("smbfs", mp, smbfs_vnodeop_p, &vp); | 239 error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp); |
240 if (error) { 241 FREE(np, M_SMBNODE); 242 return error; 243 } 244 vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; 245 bzero(np, sizeof(*np)); 246 vp->v_data = np; 247 np->n_vnode = vp; --- 196 unchanged lines hidden --- | 240 if (error) { 241 FREE(np, M_SMBNODE); 242 return error; 243 } 244 vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG; 245 bzero(np, sizeof(*np)); 246 vp->v_data = np; 247 np->n_vnode = vp; --- 196 unchanged lines hidden --- |