Kernel: Fix writes to ProcFS (#6879)

When using `sysctl` you can enable/disable values by writing to the
ProcFS. Some drift must have occured where writing was failing due to
a missing `set_mtime` call. Whenever one `write`'s a file the modified
time (mtime) will be updated so we need to implement this interface in
ProcFS.
This commit is contained in:
Spencer Dixon 2021-05-05 15:07:13 -04:00 committed by GitHub
parent 773c17b6a0
commit 2156c728cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -1562,6 +1562,11 @@ KResultOr<NonnullRefPtr<Custody>> ProcFSInode::resolve_as_link(Custody& base, Re
return *res;
}
KResult ProcFSInode::set_mtime(time_t)
{
return KSuccess;
}
ProcFSProxyInode::ProcFSProxyInode(ProcFS& fs, FileDescription& fd)
: Inode(fs, 0)
, m_fd(fd)

View file

@ -90,6 +90,7 @@ private:
virtual KResult chmod(mode_t) override;
virtual KResult chown(uid_t, gid_t) override;
virtual KResultOr<NonnullRefPtr<Custody>> resolve_as_link(Custody& base, RefPtr<Custody>* out_parent = nullptr, int options = 0, int symlink_recursion_level = 0) const override;
virtual KResult set_mtime(time_t) override;
KResult refresh_data(FileDescription&) const;