Added a "reenter" parameter to the {read|write}_pages() functions to give file
systems a chance to know if they have locked already. This fixes a locking problem in BFS where one thread tried to acquire two read locks (where someone else trying to acquire a write lock would have caused a dead lock). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17108 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1643,7 +1643,8 @@ devfs_can_page(fs_volume _fs, fs_vnode _vnode, fs_cookie cookie)
|
||||
|
||||
|
||||
static status_t
|
||||
devfs_read_pages(fs_volume _fs, fs_vnode _vnode, fs_cookie _cookie, off_t pos, const iovec *vecs, size_t count, size_t *_numBytes)
|
||||
devfs_read_pages(fs_volume _fs, fs_vnode _vnode, fs_cookie _cookie, off_t pos,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter)
|
||||
{
|
||||
struct devfs_vnode *vnode = (devfs_vnode *)_vnode;
|
||||
struct devfs_cookie *cookie = (struct devfs_cookie *)_cookie;
|
||||
@@ -1663,7 +1664,8 @@ devfs_read_pages(fs_volume _fs, fs_vnode _vnode, fs_cookie _cookie, off_t pos, c
|
||||
|
||||
|
||||
static status_t
|
||||
devfs_write_pages(fs_volume _fs, fs_vnode _vnode, fs_cookie _cookie, off_t pos, const iovec *vecs, size_t count, size_t *_numBytes)
|
||||
devfs_write_pages(fs_volume _fs, fs_vnode _vnode, fs_cookie _cookie, off_t pos,
|
||||
const iovec *vecs, size_t count, size_t *_numBytes, bool reenter)
|
||||
{
|
||||
struct devfs_vnode *vnode = (devfs_vnode *)_vnode;
|
||||
struct devfs_cookie *cookie = (struct devfs_cookie *)_cookie;
|
||||
|
||||
Reference in New Issue
Block a user