1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

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

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);
}
}