diff --git a/fs/mount/fs_mount.c b/fs/mount/fs_mount.c index 38396bed0bf6d4d5aa7294b05b4bbcf80d6b5ed9..7326441a7fe5b36959cac2af2577879288d9efc4 100755 --- a/fs/mount/fs_mount.c +++ b/fs/mount/fs_mount.c @@ -62,6 +62,9 @@ #include "fs/mount.h" #include "fs/driver.h" #include "fs/fs.h" +#ifdef LOSCFG_FS_ZPFS +#include "zpfs.h" +#endif /* At least one filesystem must be defined, or this file will not compile. @@ -255,6 +258,19 @@ int mount(const char *source, const char *target, #endif mnt = MountAlloc(mountpt_vnode, (struct MountOps*)mops); + +#ifdef LOSCFG_FS_ZPFS + if (strcmp(filesystemtype, ZPFS_NAME) == 0) + { + ret = ZpfsPrepare(source, target, mnt); + if (ret < 0) + { + errcode = ret; + goto errout_with_mountpt; + } + } +#endif + mnt->mountFlags = mountflags; mountpt_vnode->useCount++; diff --git a/fs/mount/fs_umount.c b/fs/mount/fs_umount.c index ad54fe6ab60854768297a190f3980e61161d139e..261a62c2601067731c9e30fc70021f55907a92de 100755 --- a/fs/mount/fs_umount.c +++ b/fs/mount/fs_umount.c @@ -91,10 +91,6 @@ int umount(const char *target) struct Vnode *covered_vnode = NULL; struct Mount *mnt = NULL; int ret; -#ifdef LOSCFG_FS_ZPFS - bool isZpfs = false; - struct inode zpfsInode; -#endif /* Verify required pointer arguments */ @@ -144,16 +140,6 @@ int umount(const char *target) goto errout; } -#ifdef LOSCFG_FS_ZPFS - if (IsZpfsFileSystem(mountpt_vnode)) - { - isZpfs = true; - zpfsInode.i_private = mountpt_vnode->i_private; - zpfsInode.u.i_ops = mountpt_vnode->u.i_ops; - zpfsInode.i_flags = mountpt_vnode->i_flags; - } -#endif - /* Release the vnode under the mount point */ if (fs_in_use(mnt, target)) { @@ -183,12 +169,6 @@ int umount(const char *target) ; /* block driver operations after umount */ } -#ifdef LOSCFG_FS_ZPFS - if (isZpfs) - { - ZpfsCleanUp((void*)&zpfsInode, fullpath); - } -#endif covered_vnode->newMount = NULL; covered_vnode->flag &= ~(VNODE_FLAG_MOUNT_ORIGIN); VnodeDrop();