fs: Replace current_fs_time() with current_time()
current_fs_time() uses struct super_block* as an argument. As per Linus's suggestion, this is changed to take struct inode* as a parameter instead. This is because the function is primarily meant for vfs inode timestamps. Also the function was renamed as per Arnd's suggestion. Change all calls to current_fs_time() to use the new current_time() function instead. current_fs_time() will be deleted. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -76,7 +76,7 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
|
||||
sd_iattr->ia_uid = GLOBAL_ROOT_UID;
|
||||
sd_iattr->ia_gid = GLOBAL_ROOT_GID;
|
||||
sd_iattr->ia_atime = sd_iattr->ia_mtime =
|
||||
sd_iattr->ia_ctime = current_fs_time(inode->i_sb);
|
||||
sd_iattr->ia_ctime = current_time(inode);
|
||||
sd->s_iattr = sd_iattr;
|
||||
}
|
||||
/* attributes were changed atleast once in past */
|
||||
@@ -113,7 +113,7 @@ static inline void set_default_inode_attr(struct inode * inode, umode_t mode)
|
||||
{
|
||||
inode->i_mode = mode;
|
||||
inode->i_atime = inode->i_mtime =
|
||||
inode->i_ctime = current_fs_time(inode->i_sb);
|
||||
inode->i_ctime = current_time(inode);
|
||||
}
|
||||
|
||||
static inline void set_inode_attr(struct inode * inode, struct iattr * iattr)
|
||||
@@ -197,7 +197,7 @@ int configfs_create(struct dentry * dentry, umode_t mode, void (*init)(struct in
|
||||
return -ENOMEM;
|
||||
|
||||
p_inode = d_inode(dentry->d_parent);
|
||||
p_inode->i_mtime = p_inode->i_ctime = current_fs_time(p_inode->i_sb);
|
||||
p_inode->i_mtime = p_inode->i_ctime = current_time(p_inode);
|
||||
configfs_set_inode_lock_class(sd, inode);
|
||||
|
||||
init(inode);
|
||||
|
||||
Reference in New Issue
Block a user