Loading fs/overlayfs/export.c +6 −6 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ static struct dentry *ovl_dentry_real_at(struct dentry *dentry, int idx) */ static struct dentry *ovl_lookup_real_one(struct dentry *connected, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct inode *dir = d_inode(connected); struct dentry *this, *parent = NULL; Loading Loading @@ -414,14 +414,14 @@ static struct dentry *ovl_lookup_real_one(struct dentry *connected, static struct dentry *ovl_lookup_real(struct super_block *sb, struct dentry *real, struct ovl_layer *layer); const struct ovl_layer *layer); /* * Lookup an indexed or hashed overlay dentry by real inode. */ static struct dentry *ovl_lookup_real_inode(struct super_block *sb, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct ovl_fs *ofs = sb->s_fs_info; struct dentry *index = NULL; Loading Loading @@ -486,7 +486,7 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb, */ static struct dentry *ovl_lookup_real_ancestor(struct super_block *sb, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct dentry *next, *parent = NULL; struct dentry *ancestor = ERR_PTR(-EIO); Loading Loading @@ -539,7 +539,7 @@ static struct dentry *ovl_lookup_real_ancestor(struct super_block *sb, */ static struct dentry *ovl_lookup_real(struct super_block *sb, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct dentry *connected; int err = 0; Loading Loading @@ -645,7 +645,7 @@ static struct dentry *ovl_get_dentry(struct super_block *sb, struct dentry *index) { struct ovl_fs *ofs = sb->s_fs_info; struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer; const struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer; struct dentry *real = upper ?: (index ?: lowerpath->dentry); /* Loading fs/overlayfs/overlayfs.h +1 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); struct dentry *ovl_dentry_upper(struct dentry *dentry); struct dentry *ovl_dentry_lower(struct dentry *dentry); struct dentry *ovl_dentry_lowerdata(struct dentry *dentry); struct ovl_layer *ovl_layer_lower(struct dentry *dentry); const struct ovl_layer *ovl_layer_lower(struct dentry *dentry); struct dentry *ovl_dentry_real(struct dentry *dentry); struct dentry *ovl_i_dentry_upper(struct inode *inode); struct inode *ovl_inode_upper(struct inode *inode); Loading fs/overlayfs/ovl_entry.h +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ struct ovl_layer { }; struct ovl_path { struct ovl_layer *layer; const struct ovl_layer *layer; struct dentry *dentry; }; Loading @@ -50,7 +50,7 @@ struct ovl_fs { unsigned int numlayer; /* Number of unique fs among layers including upper fs */ unsigned int numfs; struct ovl_layer *layers; const struct ovl_layer *layers; struct ovl_sb *fs; /* workbasedir is the path at workdir= mount option */ struct dentry *workbasedir; Loading fs/overlayfs/readdir.c +1 −1 Original line number Diff line number Diff line Loading @@ -691,7 +691,7 @@ static int ovl_iterate_real(struct file *file, struct dir_context *ctx) int err; struct ovl_dir_file *od = file->private_data; struct dentry *dir = file->f_path.dentry; struct ovl_layer *lower_layer = ovl_layer_lower(dir); const struct ovl_layer *lower_layer = ovl_layer_lower(dir); struct ovl_readdir_translate rdt = { .ctx.actor = ovl_fill_real, .orig_ctx = ctx, Loading fs/overlayfs/super.c +12 −11 Original line number Diff line number Diff line Loading @@ -1320,12 +1320,13 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, { int err; unsigned int i; struct ovl_layer *layers; err = -ENOMEM; ofs->layers = kcalloc(numlower + 1, sizeof(struct ovl_layer), GFP_KERNEL); if (ofs->layers == NULL) layers = kcalloc(numlower + 1, sizeof(struct ovl_layer), GFP_KERNEL); if (!layers) goto out; ofs->layers = layers; ofs->fs = kcalloc(numlower + 1, sizeof(struct ovl_sb), GFP_KERNEL); if (ofs->fs == NULL) Loading @@ -1334,9 +1335,9 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, /* idx/fsid 0 are reserved for upper fs even with lower only overlay */ ofs->numfs++; ofs->layers[0].mnt = ofs->upper_mnt; ofs->layers[0].idx = 0; ofs->layers[0].fsid = 0; layers[0].mnt = ofs->upper_mnt; layers[0].idx = 0; layers[0].fsid = 0; ofs->numlayer = 1; /* Loading Loading @@ -1389,11 +1390,11 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, */ mnt->mnt_flags |= MNT_READONLY | MNT_NOATIME; ofs->layers[ofs->numlayer].trap = trap; ofs->layers[ofs->numlayer].mnt = mnt; ofs->layers[ofs->numlayer].idx = ofs->numlayer; ofs->layers[ofs->numlayer].fsid = fsid; ofs->layers[ofs->numlayer].fs = &ofs->fs[fsid]; layers[ofs->numlayer].trap = trap; layers[ofs->numlayer].mnt = mnt; layers[ofs->numlayer].idx = ofs->numlayer; layers[ofs->numlayer].fsid = fsid; layers[ofs->numlayer].fs = &ofs->fs[fsid]; ofs->numlayer++; ofs->fs[fsid].is_lower = true; } Loading Loading
fs/overlayfs/export.c +6 −6 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ static struct dentry *ovl_dentry_real_at(struct dentry *dentry, int idx) */ static struct dentry *ovl_lookup_real_one(struct dentry *connected, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct inode *dir = d_inode(connected); struct dentry *this, *parent = NULL; Loading Loading @@ -414,14 +414,14 @@ static struct dentry *ovl_lookup_real_one(struct dentry *connected, static struct dentry *ovl_lookup_real(struct super_block *sb, struct dentry *real, struct ovl_layer *layer); const struct ovl_layer *layer); /* * Lookup an indexed or hashed overlay dentry by real inode. */ static struct dentry *ovl_lookup_real_inode(struct super_block *sb, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct ovl_fs *ofs = sb->s_fs_info; struct dentry *index = NULL; Loading Loading @@ -486,7 +486,7 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb, */ static struct dentry *ovl_lookup_real_ancestor(struct super_block *sb, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct dentry *next, *parent = NULL; struct dentry *ancestor = ERR_PTR(-EIO); Loading Loading @@ -539,7 +539,7 @@ static struct dentry *ovl_lookup_real_ancestor(struct super_block *sb, */ static struct dentry *ovl_lookup_real(struct super_block *sb, struct dentry *real, struct ovl_layer *layer) const struct ovl_layer *layer) { struct dentry *connected; int err = 0; Loading Loading @@ -645,7 +645,7 @@ static struct dentry *ovl_get_dentry(struct super_block *sb, struct dentry *index) { struct ovl_fs *ofs = sb->s_fs_info; struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer; const struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer; struct dentry *real = upper ?: (index ?: lowerpath->dentry); /* Loading
fs/overlayfs/overlayfs.h +1 −1 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path); struct dentry *ovl_dentry_upper(struct dentry *dentry); struct dentry *ovl_dentry_lower(struct dentry *dentry); struct dentry *ovl_dentry_lowerdata(struct dentry *dentry); struct ovl_layer *ovl_layer_lower(struct dentry *dentry); const struct ovl_layer *ovl_layer_lower(struct dentry *dentry); struct dentry *ovl_dentry_real(struct dentry *dentry); struct dentry *ovl_i_dentry_upper(struct inode *inode); struct inode *ovl_inode_upper(struct inode *inode); Loading
fs/overlayfs/ovl_entry.h +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ struct ovl_layer { }; struct ovl_path { struct ovl_layer *layer; const struct ovl_layer *layer; struct dentry *dentry; }; Loading @@ -50,7 +50,7 @@ struct ovl_fs { unsigned int numlayer; /* Number of unique fs among layers including upper fs */ unsigned int numfs; struct ovl_layer *layers; const struct ovl_layer *layers; struct ovl_sb *fs; /* workbasedir is the path at workdir= mount option */ struct dentry *workbasedir; Loading
fs/overlayfs/readdir.c +1 −1 Original line number Diff line number Diff line Loading @@ -691,7 +691,7 @@ static int ovl_iterate_real(struct file *file, struct dir_context *ctx) int err; struct ovl_dir_file *od = file->private_data; struct dentry *dir = file->f_path.dentry; struct ovl_layer *lower_layer = ovl_layer_lower(dir); const struct ovl_layer *lower_layer = ovl_layer_lower(dir); struct ovl_readdir_translate rdt = { .ctx.actor = ovl_fill_real, .orig_ctx = ctx, Loading
fs/overlayfs/super.c +12 −11 Original line number Diff line number Diff line Loading @@ -1320,12 +1320,13 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, { int err; unsigned int i; struct ovl_layer *layers; err = -ENOMEM; ofs->layers = kcalloc(numlower + 1, sizeof(struct ovl_layer), GFP_KERNEL); if (ofs->layers == NULL) layers = kcalloc(numlower + 1, sizeof(struct ovl_layer), GFP_KERNEL); if (!layers) goto out; ofs->layers = layers; ofs->fs = kcalloc(numlower + 1, sizeof(struct ovl_sb), GFP_KERNEL); if (ofs->fs == NULL) Loading @@ -1334,9 +1335,9 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, /* idx/fsid 0 are reserved for upper fs even with lower only overlay */ ofs->numfs++; ofs->layers[0].mnt = ofs->upper_mnt; ofs->layers[0].idx = 0; ofs->layers[0].fsid = 0; layers[0].mnt = ofs->upper_mnt; layers[0].idx = 0; layers[0].fsid = 0; ofs->numlayer = 1; /* Loading Loading @@ -1389,11 +1390,11 @@ static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs, */ mnt->mnt_flags |= MNT_READONLY | MNT_NOATIME; ofs->layers[ofs->numlayer].trap = trap; ofs->layers[ofs->numlayer].mnt = mnt; ofs->layers[ofs->numlayer].idx = ofs->numlayer; ofs->layers[ofs->numlayer].fsid = fsid; ofs->layers[ofs->numlayer].fs = &ofs->fs[fsid]; layers[ofs->numlayer].trap = trap; layers[ofs->numlayer].mnt = mnt; layers[ofs->numlayer].idx = ofs->numlayer; layers[ofs->numlayer].fsid = fsid; layers[ofs->numlayer].fs = &ofs->fs[fsid]; ofs->numlayer++; ofs->fs[fsid].is_lower = true; } Loading