Skip to content

Commit 278832b

Browse files
jtlaytonbrauner
authored andcommitted
binderfs: convert to ctime accessor functions
In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Reviewed-by: Jan Kara <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 95f8020 commit 278832b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/android/binderfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int binderfs_binder_device_create(struct inode *ref_inode,
153153
goto err;
154154

155155
inode->i_ino = minor + INODE_OFFSET;
156-
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
156+
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
157157
init_special_inode(inode, S_IFCHR | 0600,
158158
MKDEV(MAJOR(binderfs_dev), minor));
159159
inode->i_fop = &binder_fops;
@@ -432,7 +432,7 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
432432
}
433433

434434
inode->i_ino = SECOND_INODE;
435-
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
435+
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
436436
init_special_inode(inode, S_IFCHR | 0600,
437437
MKDEV(MAJOR(binderfs_dev), minor));
438438
inode->i_fop = &binder_ctl_fops;
@@ -474,7 +474,7 @@ static struct inode *binderfs_make_inode(struct super_block *sb, int mode)
474474
if (ret) {
475475
ret->i_ino = iunique(sb, BINDERFS_MAX_MINOR + INODE_OFFSET);
476476
ret->i_mode = mode;
477-
ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
477+
ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret);
478478
}
479479
return ret;
480480
}
@@ -703,7 +703,7 @@ static int binderfs_fill_super(struct super_block *sb, struct fs_context *fc)
703703
inode->i_ino = FIRST_INODE;
704704
inode->i_fop = &simple_dir_operations;
705705
inode->i_mode = S_IFDIR | 0755;
706-
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
706+
inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
707707
inode->i_op = &binderfs_dir_inode_operations;
708708
set_nlink(inode, 2);
709709

0 commit comments

Comments
 (0)