@@ -316,7 +316,7 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb,
dentry = d_find_any_alias(inode);
if (!dentry) {
- dentry = d_alloc_anon(inode->i_sb);
+ dentry = d_alloc_anon(inode_sb(inode));
if (!dentry)
goto nomem;
oe = ovl_alloc_entry(lower ? 1 : 0);
@@ -199,7 +199,7 @@ int ovl_permission(struct inode *inode, int mask)
if (err)
return err;
- old_cred = ovl_override_creds(inode->i_sb);
+ old_cred = ovl_override_creds(inode_sb(inode));
if (!upperinode &&
!special_file(realinode->i_mode) && mask & MAY_WRITE) {
mask &= ~(MAY_WRITE | MAY_APPEND);
@@ -342,7 +342,7 @@ struct posix_acl *ovl_get_acl(struct inode *inode, int type)
if (!IS_ENABLED(CONFIG_FS_POSIX_ACL) || !IS_POSIXACL(realinode))
return NULL;
- old_cred = ovl_override_creds(inode->i_sb);
+ old_cred = ovl_override_creds(inode_sb(inode));
acl = get_acl(realinode, type);
revert_creds(old_cred);
@@ -445,7 +445,7 @@ static inline void ovl_lockdep_annotate_inode_mutex_key(struct inode *inode)
static struct lock_class_key ovl_i_mutex_dir_key[OVL_MAX_NESTING];
static struct lock_class_key ovl_i_lock_key[OVL_MAX_NESTING];
- int depth = inode->i_sb->s_stack_depth - 1;
+ int depth = inode_sb(inode)->s_stack_depth - 1;
if (WARN_ON_ONCE(depth < 0 || depth >= OVL_MAX_NESTING))
depth = 0;
@@ -127,7 +127,7 @@ static struct dentry *ovl_d_real(struct dentry *dentry,
return real;
bug:
WARN(1, "ovl_d_real(%pd4, %s:%lu): real dentry not found\n", dentry,
- inode ? inode->i_sb->s_id : "NULL", inode ? inode->i_ino : 0);
+ inode ? inode_sb(inode)->s_id : "NULL", inode ? inode->i_ino : 0);
return dentry;
}
Signed-off-by: Mark Fasheh <mfasheh@suse.de> --- fs/overlayfs/export.c | 2 +- fs/overlayfs/inode.c | 6 +++--- fs/overlayfs/super.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)