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:
Andreas Kling 2021-04-30 15:51:06 +02:00
parent a5f385f052
commit cd9be1733c
Notes: sideshowbarker 2024-07-18 18:52:22 +09:00
8 changed files with 42 additions and 44 deletions

View file

@ -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()