mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
VFS: change vfs_class::nothingisopen members
Do not free VFS before nested one. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
5b0f177e62
commit
94c0b79f37
@ -842,9 +842,7 @@ vfs_s_getid (const vfs_path_t * vpath)
|
||||
static gboolean
|
||||
vfs_s_nothingisopen (vfsid id)
|
||||
{
|
||||
(void) id;
|
||||
/* Our data structures should survive free of superblock at any time */
|
||||
return TRUE;
|
||||
return (VFS_SUPER (id)->fd_usage <= 0);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -1373,14 +1373,6 @@ extfs_getid (const vfs_path_t * vpath)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static gboolean
|
||||
extfs_nothingisopen (vfsid id)
|
||||
{
|
||||
return (VFS_SUPER (id)->fd_usage <= 0);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static vfs_path_t *
|
||||
extfs_getlocalcopy (const vfs_path_t * vpath)
|
||||
{
|
||||
@ -1614,7 +1606,6 @@ vfs_init_extfs (void)
|
||||
vfs_extfs_ops->ferrno = extfs_errno;
|
||||
vfs_extfs_ops->lseek = extfs_lseek;
|
||||
vfs_extfs_ops->getid = extfs_getid;
|
||||
vfs_extfs_ops->nothingisopen = extfs_nothingisopen;
|
||||
vfs_extfs_ops->getlocalcopy = extfs_getlocalcopy;
|
||||
vfs_extfs_ops->ungetlocalcopy = extfs_ungetlocalcopy;
|
||||
vfs_extfs_ops->mkdir = extfs_mkdir;
|
||||
|
@ -421,6 +421,16 @@ local_lseek (void *data, off_t offset, int whence)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static gboolean
|
||||
local_nothingisopen (vfsid id)
|
||||
{
|
||||
(void) id;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
vfs_init_localfs (void)
|
||||
{
|
||||
@ -455,6 +465,7 @@ vfs_init_localfs (void)
|
||||
vfs_local_ops->ungetlocalcopy = local_ungetlocalcopy;
|
||||
vfs_local_ops->mkdir = local_mkdir;
|
||||
vfs_local_ops->rmdir = local_rmdir;
|
||||
vfs_local_ops->nothingisopen = local_nothingisopen;
|
||||
vfs_register_class (vfs_local_ops);
|
||||
}
|
||||
|
||||
|
@ -2211,6 +2211,17 @@ smbfs_fstat (void *data, struct stat *buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
static gboolean
|
||||
smbfs_nothingisopen (vfsid id)
|
||||
{
|
||||
/* FIXME */
|
||||
(void) id;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** public functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
@ -2274,6 +2285,7 @@ vfs_init_smbfs (void)
|
||||
vfs_smbfs_ops->mkdir = smbfs_mkdir;
|
||||
vfs_smbfs_ops->rmdir = smbfs_rmdir;
|
||||
vfs_smbfs_ops->setctl = smbfs_setctl;
|
||||
vfs_smbfs_ops->nothingisopen = smbfs_nothingisopen;
|
||||
vfs_register_class (vfs_smbfs_ops);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user