git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ld-tool portability fix: MacOS build experience
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
mount.c
diff --git
a/lunaix-os/kernel/fs/mount.c
b/lunaix-os/kernel/fs/mount.c
index 96cc7418cec8a702573120a70b824d79fcaf89ac..2b996d413c8b304dfb6e7efc71454ddbd9a8c226 100644
(file)
--- a/
lunaix-os/kernel/fs/mount.c
+++ b/
lunaix-os/kernel/fs/mount.c
@@
-63,6
+63,8
@@
__vfs_do_unmount(struct v_mount* mnt)
mnt_chillax(mnt->parent);
mnt_chillax(mnt->parent);
+ mnt->mnt_point->mnt = mnt->parent;
+
vfs_sb_free(sb);
atomic_fetch_sub(&mnt->mnt_point->ref_count, 1);
vfree(mnt);
vfs_sb_free(sb);
atomic_fetch_sub(&mnt->mnt_point->ref_count, 1);
vfree(mnt);
@@
-249,6
+251,11
@@
__DEFINE_LXSYSCALL4(int,
goto done;
}
goto done;
}
+ if (mnt->mnt->mnt_point == mnt) {
+ errno = EBUSY;
+ goto done;
+ }
+
// By our convention.
// XXX could we do better?
struct device* device = NULL;
// By our convention.
// XXX could we do better?
struct device* device = NULL;