Renamed the public fs functions (removed the vfs_ prefix), and separated

them from other functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7802 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-06-07 14:25:22 +00:00
parent d0da374bc3
commit a540a3f904
+27 -23
View File
@@ -1237,11 +1237,11 @@ get_new_fd(int type, struct vnode *vnode, fs_cookie cookie, int openMode, bool k
// #pragma mark - // #pragma mark -
// Functions the VFS exports for other parts of the kernel // Public VFS API
status_t extern "C" status_t
vfs_new_vnode(mount_id mountID, vnode_id vnodeID, fs_vnode privateNode) new_vnode(mount_id mountID, vnode_id vnodeID, fs_vnode privateNode)
{ {
if (privateNode == NULL) if (privateNode == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;
@@ -1267,8 +1267,8 @@ vfs_new_vnode(mount_id mountID, vnode_id vnodeID, fs_vnode privateNode)
} }
status_t extern "C" status_t
vfs_get_vnode(mount_id mountID, vnode_id vnodeID, fs_vnode *_fsNode) get_vnode(mount_id mountID, vnode_id vnodeID, fs_vnode *_fsNode)
{ {
struct vnode *vnode; struct vnode *vnode;
@@ -1281,8 +1281,8 @@ vfs_get_vnode(mount_id mountID, vnode_id vnodeID, fs_vnode *_fsNode)
} }
status_t extern "C" status_t
vfs_put_vnode(mount_id mountID, vnode_id vnodeID) put_vnode(mount_id mountID, vnode_id vnodeID)
{ {
struct vnode *vnode; struct vnode *vnode;
@@ -1297,6 +1297,26 @@ vfs_put_vnode(mount_id mountID, vnode_id vnodeID)
} }
extern "C" status_t
remove_vnode(mount_id mountID, vnode_id vnodeID)
{
struct vnode *vnode;
mutex_lock(&sVnodeMutex);
vnode = lookup_vnode(mountID, vnodeID);
if (vnode)
vnode->delete_me = true;
mutex_unlock(&sVnodeMutex);
return 0;
}
// #pragma mark -
// Functions the VFS exports for other parts of the kernel
void void
vfs_vnode_acquire_ref(void *vnode) vfs_vnode_acquire_ref(void *vnode)
{ {
@@ -1313,22 +1333,6 @@ vfs_vnode_release_ref(void *vnode)
} }
status_t
vfs_remove_vnode(mount_id mountID, vnode_id vnodeID)
{
struct vnode *vnode;
mutex_lock(&sVnodeMutex);
vnode = lookup_vnode(mountID, vnodeID);
if (vnode)
vnode->delete_me = true;
mutex_unlock(&sVnodeMutex);
return 0;
}
void * void *
vfs_get_cache_ptr(void *vnode) vfs_get_cache_ptr(void *vnode)
{ {