Skip to content

Commit

Permalink
Merge pull request #9 from gshrikant/master
Browse files Browse the repository at this point in the history
Fix usage of CURRENT_TIME macro.
  • Loading branch information
psankar authored Jun 14, 2017
2 parents 5d00eeb + 3866925 commit af55617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ static int simplefs_create_fs_object(struct inode *dir, struct dentry *dentry,

inode->i_sb = sb;
inode->i_op = &simplefs_inode_ops;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
inode->i_ino = (count + SIMPLEFS_START_INO - SIMPLEFS_RESERVED_INODES + 1);

sfs_inode = kmem_cache_alloc(sfs_inode_cachep, GFP_KERNEL);
Expand Down

1 comment on commit af55617

@DafanziQ
Copy link

Choose a reason for hiding this comment

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

hi, psankar ,i can't compile this project succussfully and thre error tis is below, how to solve it ,thanks
make -C /lib/modules/3.4.0/build M=/usr/src/kernels/simplefs-master modules
make[1]: Entering directory /usr/src/kernels/linux-3.4' CC [M] /usr/src/kernels/simplefs-master/simple.o /usr/src/kernels/simplefs-master/simple.c:477: warning: initialization from incompatible pointer type /usr/src/kernels/simplefs-master/simple.c:478: warning: initialization from incompatible pointer type /usr/src/kernels/simplefs-master/simple.c: In function ‘simplefs_create_fs_object’: /usr/src/kernels/simplefs-master/simple.c:529: error: implicit declaration of function ‘current_time’ /usr/src/kernels/simplefs-master/simple.c:529: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ /usr/src/kernels/simplefs-master/simple.c: In function ‘simplefs_iget’: /usr/src/kernels/simplefs-master/simple.c:642: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ /usr/src/kernels/simplefs-master/simple.c: In function ‘simplefs_fill_super’: /usr/src/kernels/simplefs-master/simple.c:878: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ make[2]: *** [/usr/src/kernels/simplefs-master/simple.o] Error 1 make[1]: *** [_module_/usr/src/kernels/simplefs-master] Error 2 make[1]: Leaving directory /usr/src/kernels/linux-3.4'
make: *** [ko] Error 2

Please sign in to comment.