We were handling closing of file descriptors incorrectly. The close_*()
and free_*_cookie() hooks of the underlying FS were always called together when the reference count of the FD dropped to zero. When blocking operations (reading/writing) on the FD were still in progress this would never happen, though. Now we additionally maintain an open count and call the close_*() hook when it drops to zero. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11882 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -36,6 +36,7 @@ struct fd_ops {
|
||||
struct file_descriptor {
|
||||
int32 type; /* descriptor type */
|
||||
int32 ref_count;
|
||||
int32 open_count;
|
||||
struct fd_ops *ops;
|
||||
union {
|
||||
struct vnode *vnode;
|
||||
|
||||
Reference in New Issue
Block a user