Skip to content

Commit

Permalink
Use current_time() over CURRENT_TIME macro
Browse files Browse the repository at this point in the history
And this wasn't done undef #ifdef due to we already had current_time()
users
  • Loading branch information
azat committed Apr 19, 2018
1 parent 90e4702 commit df5314f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static struct inode *simplefs_iget(struct super_block *sb, int ino)

/* FIXME: We should store these times to disk and retrieve them */
inode->i_atime = inode->i_mtime = inode->i_ctime =
CURRENT_TIME;
current_time(inode);

inode->i_private = sfs_inode;

Expand Down Expand Up @@ -875,7 +875,7 @@ int simplefs_fill_super(struct super_block *sb, void *data, int silent)
root_inode->i_op = &simplefs_inode_ops;
root_inode->i_fop = &simplefs_dir_operations;
root_inode->i_atime = root_inode->i_mtime = root_inode->i_ctime =
CURRENT_TIME;
current_time(root_inode);

root_inode->i_private =
simplefs_get_inode(sb, SIMPLEFS_ROOTDIR_INODE_NUMBER);
Expand Down

2 comments on commit df5314f

@DafanziQ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi zcat ,i have a puzzle ,i can't compile this project successfully,cause there is no defintaion of function current_time(),how to solve it?

error: implicit declaration of function ‘current_time’

@DafanziQ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx ,i have found the reason, when i compile the project with kernel4.10 the error disapeered

Please sign in to comment.