@@ -302,7 +302,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
302302 inode -> i_mode = mode ;
303303 inode -> i_uid = current_fsuid ();
304304 inode -> i_gid = current_fsgid ();
305- inode -> i_mtime = inode -> i_ctime = inode -> i_atime = current_time (inode );
305+ inode -> i_mtime = inode -> i_atime = inode_set_ctime_current (inode );
306306
307307 if (S_ISREG (mode )) {
308308 struct mqueue_inode_info * info ;
@@ -489,7 +489,7 @@ static struct vfsmount *mq_create_mount(struct ipc_namespace *ns)
489489
490490static void init_once (void * foo )
491491{
492- struct mqueue_inode_info * p = ( struct mqueue_inode_info * ) foo ;
492+ struct mqueue_inode_info * p = foo ;
493493
494494 inode_init_once (& p -> vfs_inode );
495495}
@@ -596,7 +596,7 @@ static int mqueue_create_attr(struct dentry *dentry, umode_t mode, void *arg)
596596
597597 put_ipc_ns (ipc_ns );
598598 dir -> i_size += DIRENT_SIZE ;
599- dir -> i_ctime = dir -> i_mtime = dir -> i_atime = current_time (dir );
599+ dir -> i_mtime = dir -> i_atime = inode_set_ctime_current (dir );
600600
601601 d_instantiate (dentry , inode );
602602 dget (dentry );
@@ -618,7 +618,7 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
618618{
619619 struct inode * inode = d_inode (dentry );
620620
621- dir -> i_ctime = dir -> i_mtime = dir -> i_atime = current_time (dir );
621+ dir -> i_mtime = dir -> i_atime = inode_set_ctime_current (dir );
622622 dir -> i_size -= DIRENT_SIZE ;
623623 drop_nlink (inode );
624624 dput (dentry );
@@ -635,7 +635,8 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
635635static ssize_t mqueue_read_file (struct file * filp , char __user * u_data ,
636636 size_t count , loff_t * off )
637637{
638- struct mqueue_inode_info * info = MQUEUE_I (file_inode (filp ));
638+ struct inode * inode = file_inode (filp );
639+ struct mqueue_inode_info * info = MQUEUE_I (inode );
639640 char buffer [FILENT_SIZE ];
640641 ssize_t ret ;
641642
@@ -656,7 +657,7 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data,
656657 if (ret <= 0 )
657658 return ret ;
658659
659- file_inode ( filp ) -> i_atime = file_inode ( filp ) -> i_ctime = current_time ( file_inode ( filp ) );
660+ inode -> i_atime = inode_set_ctime_current ( inode );
660661 return ret ;
661662}
662663
@@ -986,8 +987,7 @@ SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
986987
987988out_unlock :
988989 inode_unlock (d_inode (mnt -> mnt_root ));
989- if (inode )
990- iput (inode );
990+ iput (inode );
991991 mnt_drop_write (mnt );
992992out_name :
993993 putname (name );
@@ -1163,8 +1163,7 @@ static int do_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr,
11631163 goto out_unlock ;
11641164 __do_notify (info );
11651165 }
1166- inode -> i_atime = inode -> i_mtime = inode -> i_ctime =
1167- current_time (inode );
1166+ inode -> i_atime = inode -> i_mtime = inode_set_ctime_current (inode );
11681167 }
11691168out_unlock :
11701169 spin_unlock (& info -> lock );
@@ -1258,8 +1257,7 @@ static int do_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr,
12581257
12591258 msg_ptr = msg_get (info );
12601259
1261- inode -> i_atime = inode -> i_mtime = inode -> i_ctime =
1262- current_time (inode );
1260+ inode -> i_atime = inode -> i_mtime = inode_set_ctime_current (inode );
12631261
12641262 /* There is now free space in queue. */
12651263 pipelined_receive (& wake_q , info );
@@ -1397,7 +1395,7 @@ static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)
13971395 if (notification == NULL ) {
13981396 if (info -> notify_owner == task_tgid (current )) {
13991397 remove_notification (info );
1400- inode -> i_atime = inode -> i_ctime = current_time (inode );
1398+ inode -> i_atime = inode_set_ctime_current (inode );
14011399 }
14021400 } else if (info -> notify_owner != NULL ) {
14031401 ret = - EBUSY ;
@@ -1423,7 +1421,7 @@ static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)
14231421
14241422 info -> notify_owner = get_pid (task_tgid (current ));
14251423 info -> notify_user_ns = get_user_ns (current_user_ns ());
1426- inode -> i_atime = inode -> i_ctime = current_time (inode );
1424+ inode -> i_atime = inode_set_ctime_current (inode );
14271425 }
14281426 spin_unlock (& info -> lock );
14291427out_fput :
@@ -1486,7 +1484,7 @@ static int do_mq_getsetattr(int mqdes, struct mq_attr *new, struct mq_attr *old)
14861484 f .file -> f_flags &= ~O_NONBLOCK ;
14871485 spin_unlock (& f .file -> f_lock );
14881486
1489- inode -> i_atime = inode -> i_ctime = current_time (inode );
1487+ inode -> i_atime = inode_set_ctime_current (inode );
14901488 }
14911489
14921490 spin_unlock (& info -> lock );
@@ -1710,11 +1708,6 @@ void mq_clear_sbinfo(struct ipc_namespace *ns)
17101708 ns -> mq_mnt -> mnt_sb -> s_fs_info = NULL ;
17111709}
17121710
1713- void mq_put_mnt (struct ipc_namespace * ns )
1714- {
1715- kern_unmount (ns -> mq_mnt );
1716- }
1717-
17181711static int __init init_mqueue_fs (void )
17191712{
17201713 int error ;
0 commit comments