params.c (cbb44f0935974bba997f8db0458fac5739ae0009) params.c (f01d08899fd7fa808ff9b8d33ca4882ab44d42fa)
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include <linux/fs.h>
4#include <linux/module.h>
5#include <linux/namei.h>
6#include <linux/fs_context.h>
7#include <linux/fs_parser.h>
8#include <linux/posix_acl_xattr.h>

--- 648 unchanged lines hidden (view full) ---

657
658 if (ctx)
659 ovl_fs_context_free(ctx);
660}
661
662static int ovl_reconfigure(struct fs_context *fc)
663{
664 struct super_block *sb = fc->root->d_sb;
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include <linux/fs.h>
4#include <linux/module.h>
5#include <linux/namei.h>
6#include <linux/fs_context.h>
7#include <linux/fs_parser.h>
8#include <linux/posix_acl_xattr.h>

--- 648 unchanged lines hidden (view full) ---

657
658 if (ctx)
659 ovl_fs_context_free(ctx);
660}
661
662static int ovl_reconfigure(struct fs_context *fc)
663{
664 struct super_block *sb = fc->root->d_sb;
665 struct ovl_fs *ofs = sb->s_fs_info;
665 struct ovl_fs *ofs = OVL_FS(sb);
666 struct super_block *upper_sb;
667 int ret = 0;
668
669 if (!(fc->sb_flags & SB_RDONLY) && ovl_force_readonly(ofs))
670 return -EROFS;
671
672 if (fc->sb_flags & SB_RDONLY && !sb_rdonly(sb)) {
673 upper_sb = ovl_upper_mnt(ofs)->mnt_sb;

--- 268 unchanged lines hidden (view full) ---

942 * @dentry: The dentry to query
943 *
944 * Prints the mount options for a given superblock.
945 * Returns zero; does not fail.
946 */
947int ovl_show_options(struct seq_file *m, struct dentry *dentry)
948{
949 struct super_block *sb = dentry->d_sb;
666 struct super_block *upper_sb;
667 int ret = 0;
668
669 if (!(fc->sb_flags & SB_RDONLY) && ovl_force_readonly(ofs))
670 return -EROFS;
671
672 if (fc->sb_flags & SB_RDONLY && !sb_rdonly(sb)) {
673 upper_sb = ovl_upper_mnt(ofs)->mnt_sb;

--- 268 unchanged lines hidden (view full) ---

942 * @dentry: The dentry to query
943 *
944 * Prints the mount options for a given superblock.
945 * Returns zero; does not fail.
946 */
947int ovl_show_options(struct seq_file *m, struct dentry *dentry)
948{
949 struct super_block *sb = dentry->d_sb;
950 struct ovl_fs *ofs = sb->s_fs_info;
950 struct ovl_fs *ofs = OVL_FS(sb);
951 size_t nr, nr_merged_lower = ofs->numlayer - ofs->numdatalayer;
952 const struct ovl_layer *data_layers = &ofs->layers[nr_merged_lower];
953
954 /* ofs->layers[0] is the upper layer */
955 seq_printf(m, ",lowerdir=%s", ofs->layers[1].name);
956 /* dump regular lower layers */
957 for (nr = 2; nr < nr_merged_lower; nr++)
958 seq_printf(m, ":%s", ofs->layers[nr].name);

--- 33 unchanged lines hidden ---
951 size_t nr, nr_merged_lower = ofs->numlayer - ofs->numdatalayer;
952 const struct ovl_layer *data_layers = &ofs->layers[nr_merged_lower];
953
954 /* ofs->layers[0] is the upper layer */
955 seq_printf(m, ",lowerdir=%s", ofs->layers[1].name);
956 /* dump regular lower layers */
957 for (nr = 2; nr < nr_merged_lower; nr++)
958 seq_printf(m, ":%s", ofs->layers[nr].name);

--- 33 unchanged lines hidden ---