Loading fs/overlayfs/export.c +3 −3 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ static int ovl_check_encode_origin(struct dentry *dentry) * ovl_connect_layer() will try to make origin's layer "connected" by * copying up a "connectable" ancestor. */ if (d_is_dir(dentry) && ofs->upper_mnt) if (d_is_dir(dentry) && ovl_upper_mnt(ofs)) return ovl_connect_layer(dentry); /* Lower file handle for indexed and non-upper dir/non-dir */ Loading Loading @@ -677,10 +677,10 @@ static struct dentry *ovl_upper_fh_to_d(struct super_block *sb, struct dentry *dentry; struct dentry *upper; if (!ofs->upper_mnt) if (!ovl_upper_mnt(ofs)) return ERR_PTR(-EACCES); upper = ovl_decode_real_fh(fh, ofs->upper_mnt, true); upper = ovl_decode_real_fh(fh, ovl_upper_mnt(ofs), true); if (IS_ERR_OR_NULL(upper)) return upper; Loading fs/overlayfs/inode.c +2 −2 Original line number Diff line number Diff line Loading @@ -456,7 +456,7 @@ int ovl_update_time(struct inode *inode, struct timespec64 *ts, int flags) if (flags & S_ATIME) { struct ovl_fs *ofs = inode->i_sb->s_fs_info; struct path upperpath = { .mnt = ofs->upper_mnt, .mnt = ovl_upper_mnt(ofs), .dentry = ovl_upperdentry_dereference(OVL_I(inode)), }; Loading Loading @@ -921,7 +921,7 @@ static bool ovl_hash_bylower(struct super_block *sb, struct dentry *upper, return true; /* Yes, if won't be copied up */ if (!ofs->upper_mnt) if (!ovl_upper_mnt(ofs)) return true; /* No, if lower hardlink is or will be broken on copy up */ Loading fs/overlayfs/namei.c +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ struct dentry *ovl_index_upper(struct ovl_fs *ofs, struct dentry *index) if (IS_ERR_OR_NULL(fh)) return ERR_CAST(fh); upper = ovl_decode_real_fh(fh, ofs->upper_mnt, true); upper = ovl_decode_real_fh(fh, ovl_upper_mnt(ofs), true); kfree(fh); if (IS_ERR_OR_NULL(upper)) Loading fs/overlayfs/ovl_entry.h +5 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,11 @@ struct ovl_fs { struct dentry *whiteout; }; static inline struct vfsmount *ovl_upper_mnt(struct ovl_fs *ofs) { return ofs->upper_mnt; } static inline struct ovl_fs *OVL_FS(struct super_block *sb) { return (struct ovl_fs *)sb->s_fs_info; Loading fs/overlayfs/readdir.c +1 −1 Original line number Diff line number Diff line Loading @@ -1120,7 +1120,7 @@ int ovl_indexdir_cleanup(struct ovl_fs *ofs) struct dentry *indexdir = ofs->indexdir; struct dentry *index = NULL; struct inode *dir = indexdir->d_inode; struct path path = { .mnt = ofs->upper_mnt, .dentry = indexdir }; struct path path = { .mnt = ovl_upper_mnt(ofs), .dentry = indexdir }; LIST_HEAD(list); struct rb_root root = RB_ROOT; struct ovl_cache_entry *p; Loading Loading
fs/overlayfs/export.c +3 −3 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ static int ovl_check_encode_origin(struct dentry *dentry) * ovl_connect_layer() will try to make origin's layer "connected" by * copying up a "connectable" ancestor. */ if (d_is_dir(dentry) && ofs->upper_mnt) if (d_is_dir(dentry) && ovl_upper_mnt(ofs)) return ovl_connect_layer(dentry); /* Lower file handle for indexed and non-upper dir/non-dir */ Loading Loading @@ -677,10 +677,10 @@ static struct dentry *ovl_upper_fh_to_d(struct super_block *sb, struct dentry *dentry; struct dentry *upper; if (!ofs->upper_mnt) if (!ovl_upper_mnt(ofs)) return ERR_PTR(-EACCES); upper = ovl_decode_real_fh(fh, ofs->upper_mnt, true); upper = ovl_decode_real_fh(fh, ovl_upper_mnt(ofs), true); if (IS_ERR_OR_NULL(upper)) return upper; Loading
fs/overlayfs/inode.c +2 −2 Original line number Diff line number Diff line Loading @@ -456,7 +456,7 @@ int ovl_update_time(struct inode *inode, struct timespec64 *ts, int flags) if (flags & S_ATIME) { struct ovl_fs *ofs = inode->i_sb->s_fs_info; struct path upperpath = { .mnt = ofs->upper_mnt, .mnt = ovl_upper_mnt(ofs), .dentry = ovl_upperdentry_dereference(OVL_I(inode)), }; Loading Loading @@ -921,7 +921,7 @@ static bool ovl_hash_bylower(struct super_block *sb, struct dentry *upper, return true; /* Yes, if won't be copied up */ if (!ofs->upper_mnt) if (!ovl_upper_mnt(ofs)) return true; /* No, if lower hardlink is or will be broken on copy up */ Loading
fs/overlayfs/namei.c +1 −1 Original line number Diff line number Diff line Loading @@ -489,7 +489,7 @@ struct dentry *ovl_index_upper(struct ovl_fs *ofs, struct dentry *index) if (IS_ERR_OR_NULL(fh)) return ERR_CAST(fh); upper = ovl_decode_real_fh(fh, ofs->upper_mnt, true); upper = ovl_decode_real_fh(fh, ovl_upper_mnt(ofs), true); kfree(fh); if (IS_ERR_OR_NULL(upper)) Loading
fs/overlayfs/ovl_entry.h +5 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,11 @@ struct ovl_fs { struct dentry *whiteout; }; static inline struct vfsmount *ovl_upper_mnt(struct ovl_fs *ofs) { return ofs->upper_mnt; } static inline struct ovl_fs *OVL_FS(struct super_block *sb) { return (struct ovl_fs *)sb->s_fs_info; Loading
fs/overlayfs/readdir.c +1 −1 Original line number Diff line number Diff line Loading @@ -1120,7 +1120,7 @@ int ovl_indexdir_cleanup(struct ovl_fs *ofs) struct dentry *indexdir = ofs->indexdir; struct dentry *index = NULL; struct inode *dir = indexdir->d_inode; struct path path = { .mnt = ofs->upper_mnt, .dentry = indexdir }; struct path path = { .mnt = ovl_upper_mnt(ofs), .dentry = indexdir }; LIST_HEAD(list); struct rb_root root = RB_ROOT; struct ovl_cache_entry *p; Loading