Skip to content

Commit 3402b14

Browse files
fmt
1 parent 5a497bb commit 3402b14

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

kernel/src/filesystem/vfs/open.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,8 @@ fn do_sys_openat2(
186186
let parent_inode: Arc<dyn IndexNode> = if parent_path.is_none() {
187187
inode_begin.clone()
188188
} else {
189-
inode_begin.lookup_follow_symlink(
190-
parent_path.unwrap(),
191-
VFS_MAX_FOLLOW_SYMLINK_TIMES,
192-
)?
189+
inode_begin
190+
.lookup_follow_symlink(parent_path.unwrap(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?
193191
};
194192
// 创建文件
195193
let inode: Arc<dyn IndexNode> = parent_inode.create(

kernel/src/filesystem/vfs/vcore.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ pub fn do_remove_dir(dirfd: i32, path: &str) -> Result<u64, SystemError> {
245245
let parent_inode: Arc<dyn IndexNode> = if parent_path.is_none() {
246246
inode_begin.clone()
247247
} else {
248-
inode_begin
249-
.lookup_follow_symlink(parent_path.unwrap(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?
248+
inode_begin.lookup_follow_symlink(parent_path.unwrap(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?
250249
};
251250

252251
if parent_inode.metadata()?.file_type != FileType::Dir {
@@ -282,8 +281,7 @@ pub fn do_unlink_at(dirfd: i32, path: &str) -> Result<u64, SystemError> {
282281
let parent_inode: Arc<dyn IndexNode> = if parent_path.is_none() {
283282
inode_begin.clone()
284283
} else {
285-
inode_begin
286-
.lookup_follow_symlink(parent_path.unwrap(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?
284+
inode_begin.lookup_follow_symlink(parent_path.unwrap(), VFS_MAX_FOLLOW_SYMLINK_TIMES)?
287285
};
288286
if parent_inode.metadata()?.file_type != FileType::Dir {
289287
return Err(SystemError::ENOTDIR);

0 commit comments

Comments
 (0)