Protect busy VfsObjs during opening and deleting
This commit is contained in:
@ -30,7 +30,9 @@ enum {
|
||||
#define VFS_PATH_MAX 1024
|
||||
|
||||
typedef struct VfsObj {
|
||||
struct VfsObj *next;
|
||||
SpinLock spinlock;
|
||||
char path[VFS_MOUNTPOINT_LABEL_MAX+1+VFS_PATH_MAX];
|
||||
void *extra;
|
||||
size_t extrasize;
|
||||
struct VfsMountPoint *vmp;
|
||||
@ -40,6 +42,13 @@ typedef struct VfsObj {
|
||||
void (*cleanup)(struct VfsObj *vobj);
|
||||
} VfsObj;
|
||||
|
||||
typedef struct {
|
||||
SpinLock spinlock;
|
||||
VfsObj *vobjs;
|
||||
} VfsBusyObjs;
|
||||
|
||||
extern VfsBusyObjs VFS_BUSY_VOBJS;
|
||||
|
||||
typedef struct VfsMountPoint {
|
||||
int _hshtbstate;
|
||||
char label[VFS_MOUNTPOINT_LABEL_MAX];
|
||||
|
||||
Reference in New Issue
Block a user