mirror of https://github.com/torvalds/linux.git
libfs: allow to specify s_d_flags
Make it possible for pseudo filesystems to specify default dentry flags. Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-1-2e6f823ebdc0@kernel.org Tested-by: syzbot@syzkaller.appspotmail.com Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
211ddde082
commit
c9822fad80
|
|
@ -680,6 +680,7 @@ static int pseudo_fs_fill_super(struct super_block *s, struct fs_context *fc)
|
||||||
s->s_export_op = ctx->eops;
|
s->s_export_op = ctx->eops;
|
||||||
s->s_xattr = ctx->xattr;
|
s->s_xattr = ctx->xattr;
|
||||||
s->s_time_gran = 1;
|
s->s_time_gran = 1;
|
||||||
|
s->s_d_flags |= ctx->s_d_flags;
|
||||||
root = new_inode(s);
|
root = new_inode(s);
|
||||||
if (!root)
|
if (!root)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ struct pseudo_fs_context {
|
||||||
const struct xattr_handler * const *xattr;
|
const struct xattr_handler * const *xattr;
|
||||||
const struct dentry_operations *dops;
|
const struct dentry_operations *dops;
|
||||||
unsigned long magic;
|
unsigned long magic;
|
||||||
|
unsigned int s_d_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct pseudo_fs_context *init_pseudo(struct fs_context *fc,
|
struct pseudo_fs_context *init_pseudo(struct fs_context *fc,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue