@@ -1059,7 +1059,7 @@ static struct dentry *kernfs_iop_lookup(struct inode *dir,
mutex_lock(&kernfs_mutex);
if (kernfs_ns_enabled(parent))
- ns = kernfs_info(dir->i_sb)->ns;
+ ns = kernfs_info(inode_sb(dir))->ns;
kn = kernfs_find_ns(parent, dentry->d_name.name, ns);
@@ -1070,7 +1070,7 @@ static struct dentry *kernfs_iop_lookup(struct inode *dir,
}
/* attach dentry and inode */
- inode = kernfs_get_inode(dir->i_sb, kn);
+ inode = kernfs_get_inode(inode_sb(dir), kn);
if (!inode) {
ret = ERR_PTR(-ENOMEM);
goto out_unlock;
@@ -173,7 +173,7 @@ static inline void set_default_inode_attr(struct inode *inode, umode_t mode)
static inline void set_inode_attr(struct inode *inode, struct iattr *iattr)
{
- struct super_block *sb = inode->i_sb;
+ struct super_block *sb = inode_sb(inode);
inode->i_uid = iattr->ia_uid;
inode->i_gid = iattr->ia_gid;
inode->i_atime = timespec_trunc(iattr->ia_atime, sb->s_time_gran);
Signed-off-by: Mark Fasheh <mfasheh@suse.de> --- fs/kernfs/dir.c | 4 ++-- fs/kernfs/inode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)