Renamed vfs_vnode_acquire_ref() to vnode_acquire_vnode().
Removed vfs_vnode_release_ref(), as vfs_put_vnode() already does the same thing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13867 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -70,8 +70,7 @@ status_t vfs_get_vnode_from_path(const char *path, bool kernel, void **vnode);
|
|||||||
status_t vfs_get_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode);
|
status_t vfs_get_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode);
|
||||||
status_t vfs_lookup_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode);
|
status_t vfs_lookup_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode);
|
||||||
void vfs_put_vnode(void *vnode);
|
void vfs_put_vnode(void *vnode);
|
||||||
void vfs_vnode_acquire_ref(void *vnode);
|
void vfs_acquire_vnode(void *vnode);
|
||||||
void vfs_vnode_release_ref(void *vnode);
|
|
||||||
status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
|
status_t vfs_get_cookie_from_fd(int fd, void **_cookie);
|
||||||
bool vfs_can_page(void *vnode, void *cookie);
|
bool vfs_can_page(void *vnode, void *cookie);
|
||||||
status_t vfs_read_pages(void *vnode, void *cookie, off_t pos, const iovec *vecs, size_t count, size_t *_numBytes);
|
status_t vfs_read_pages(void *vnode, void *cookie, off_t pos, const iovec *vecs, size_t count, size_t *_numBytes);
|
||||||
|
|||||||
+5
-5
@@ -615,7 +615,7 @@ cache_prefetch_vnode(void *vnode, off_t offset, size_t size)
|
|||||||
{
|
{
|
||||||
vm_cache_ref *cache;
|
vm_cache_ref *cache;
|
||||||
if (vfs_get_vnode_cache(vnode, &cache) != B_OK) {
|
if (vfs_get_vnode_cache(vnode, &cache) != B_OK) {
|
||||||
vfs_vnode_release_ref(vnode);
|
vfs_put_vnode(vnode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -685,7 +685,7 @@ cache_prefetch(mount_id mountID, vnode_id vnodeID, off_t offset, size_t size)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
cache_prefetch_vnode(vnode, offset, size);
|
cache_prefetch_vnode(vnode, offset, size);
|
||||||
vfs_vnode_release_ref(vnode);
|
vfs_put_vnode(vnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -776,9 +776,9 @@ file_cache_create(mount_id mountID, vnode_id vnodeID, off_t size, int fd)
|
|||||||
return ref;
|
return ref;
|
||||||
|
|
||||||
err3:
|
err3:
|
||||||
vfs_vnode_release_ref(ref->vnode);
|
vfs_put_vnode(ref->vnode);
|
||||||
err2:
|
err2:
|
||||||
vfs_vnode_release_ref(ref->device);
|
vfs_put_vnode(ref->device);
|
||||||
err1:
|
err1:
|
||||||
delete ref;
|
delete ref;
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -795,7 +795,7 @@ file_cache_delete(void *_cacheRef)
|
|||||||
|
|
||||||
TRACE(("file_cache_delete(ref = %p)\n", ref));
|
TRACE(("file_cache_delete(ref = %p)\n", ref));
|
||||||
|
|
||||||
vfs_vnode_release_ref(ref->device);
|
vfs_put_vnode(ref->device);
|
||||||
delete ref;
|
delete ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -81,7 +81,7 @@ static void
|
|||||||
store_acquire_ref(struct vm_store *_store)
|
store_acquire_ref(struct vm_store *_store)
|
||||||
{
|
{
|
||||||
vnode_store *store = (vnode_store *)_store;
|
vnode_store *store = (vnode_store *)_store;
|
||||||
vfs_vnode_acquire_ref(store->vnode);
|
vfs_acquire_vnode(store->vnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ static void
|
|||||||
store_release_ref(struct vm_store *_store)
|
store_release_ref(struct vm_store *_store)
|
||||||
{
|
{
|
||||||
vnode_store *store = (vnode_store *)_store;
|
vnode_store *store = (vnode_store *)_store;
|
||||||
vfs_vnode_release_ref(store->vnode);
|
vfs_put_vnode(store->vnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ vm_create_vnode_store(void *vnode)
|
|||||||
{
|
{
|
||||||
vnode_store *store = (vnode_store *)malloc(sizeof(struct vnode_store));
|
vnode_store *store = (vnode_store *)malloc(sizeof(struct vnode_store));
|
||||||
if (store == NULL) {
|
if (store == NULL) {
|
||||||
vfs_vnode_release_ref(vnode);
|
vfs_put_vnode(vnode);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2112,19 +2112,14 @@ unremove_vnode(mount_id mountID, vnode_id vnodeID)
|
|||||||
// Functions the VFS exports for other parts of the kernel
|
// Functions the VFS exports for other parts of the kernel
|
||||||
|
|
||||||
|
|
||||||
void
|
/** Acquires another reference to the vnode that has to be released
|
||||||
vfs_vnode_acquire_ref(void *vnode)
|
* by calling vfs_put_vnode().
|
||||||
{
|
*/
|
||||||
FUNCTION(("vfs_vnode_acquire_ref: vnode 0x%p\n", vnode));
|
|
||||||
inc_vnode_ref_count((struct vnode *)vnode);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
vfs_vnode_release_ref(void *vnode)
|
vfs_acquire_vnode(void *_vnode)
|
||||||
{
|
{
|
||||||
FUNCTION(("vfs_vnode_release_ref: vnode 0x%p\n", vnode));
|
inc_vnode_ref_count((struct vnode *)_vnode);
|
||||||
dec_vnode_ref_count((struct vnode *)vnode, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1118,7 +1118,7 @@ _vm_map_file(aspace_id aid, const char *name, void **_address, uint32 addressSpe
|
|||||||
return area->id;
|
return area->id;
|
||||||
|
|
||||||
err2:
|
err2:
|
||||||
vfs_vnode_release_ref(vnode);
|
vfs_put_vnode(vnode);
|
||||||
err1:
|
err1:
|
||||||
vm_put_aspace(aspace);
|
vm_put_aspace(aspace);
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user