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
refactor: decouple the executable file implementations with execve functionality.
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
vfs.c
diff --git
a/lunaix-os/kernel/fs/vfs.c
b/lunaix-os/kernel/fs/vfs.c
index 7959fc3ffc3cce0cc58d79ec40ec777666480e5f..6f4b3b09532bee8d9ca3dbdb98faade21aedeb40 100644
(file)
--- a/
lunaix-os/kernel/fs/vfs.c
+++ b/
lunaix-os/kernel/fs/vfs.c
@@
-1054,8
+1054,6
@@
__vfs_do_unlink(struct v_dnode* dnode)
if (inode->open_count) {
errno = EBUSY;
} else if (!(inode->itype & VFS_IFDIR)) {
if (inode->open_count) {
errno = EBUSY;
} else if (!(inode->itype & VFS_IFDIR)) {
- // The underlying unlink implementation should handle
- // symlink case
errno = inode->ops->unlink(inode);
if (!errno) {
vfs_d_free(dnode);
errno = inode->ops->unlink(inode);
if (!errno) {
vfs_d_free(dnode);
@@
-1108,10
+1106,8
@@
__DEFINE_LXSYSCALL2(int, link, const char*, oldpath, const char*, newpath)
errno = __vfs_try_locate_file(oldpath, &dentry, &to_link, 0);
if (!errno) {
errno = __vfs_try_locate_file(
errno = __vfs_try_locate_file(oldpath, &dentry, &to_link, 0);
if (!errno) {
errno = __vfs_try_locate_file(
- newpath, &name_dentry, &name_file, FLOCATE_CREATE_
EMPT
Y);
+ newpath, &name_dentry, &name_file, FLOCATE_CREATE_
ONL
Y);
if (!errno) {
if (!errno) {
- errno = EEXIST;
- } else if (name_file) {
errno = vfs_link(to_link, name_file);
}
}
errno = vfs_link(to_link, name_file);
}
}