Kernel: Simplify sys$inode_watcher_remove_watch() a little bit

This commit is contained in:
Andreas Kling 2021-09-05 18:41:28 +02:00
parent d912bfdf38
commit c076d765c4
Notes: sideshowbarker 2024-07-18 04:40:39 +09:00

View File

@ -58,13 +58,7 @@ KResultOr<FlatPtr> Process::sys$inode_watcher_remove_watch(int fd, int wd)
auto description = TRY(fds().file_description(fd));
if (!description->is_inode_watcher())
return EBADF;
auto inode_watcher = description->inode_watcher();
auto result = inode_watcher->unregister_by_wd(wd);
if (result.is_error())
return result;
return 0;
return description->inode_watcher()->unregister_by_wd(wd);
}
}