mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 15:58:47 +00:00
Kernel: Make Inode::set_{a,c,m}time return KResult
This exposed some missing error propagation, which this patch also takes care of.
This commit is contained in:
parent
a5f385f052
commit
cd9be1733c
Notes:
sideshowbarker
2024-07-18 18:52:22 +09:00
Author: https://github.com/awesomekling
Commit: cd9be1733c
8 changed files with 42 additions and 44 deletions
|
@ -1584,34 +1584,34 @@ void Ext2FSInode::one_ref_left()
|
|||
// FIXME: I would like to not live forever, but uncached Ext2FS is fucking painful right now.
|
||||
}
|
||||
|
||||
int Ext2FSInode::set_atime(time_t t)
|
||||
KResult Ext2FSInode::set_atime(time_t t)
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
return EROFS;
|
||||
m_raw_inode.i_atime = t;
|
||||
set_metadata_dirty(true);
|
||||
return 0;
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
int Ext2FSInode::set_ctime(time_t t)
|
||||
KResult Ext2FSInode::set_ctime(time_t t)
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
return EROFS;
|
||||
m_raw_inode.i_ctime = t;
|
||||
set_metadata_dirty(true);
|
||||
return 0;
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
int Ext2FSInode::set_mtime(time_t t)
|
||||
KResult Ext2FSInode::set_mtime(time_t t)
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
if (fs().is_readonly())
|
||||
return -EROFS;
|
||||
return EROFS;
|
||||
m_raw_inode.i_mtime = t;
|
||||
set_metadata_dirty(true);
|
||||
return 0;
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
KResult Ext2FSInode::increment_link_count()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue