Commit cf6da236 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christian Brauner

fs: export setup_bdev_super

We'll want to use setup_bdev_super instead of duplicating it in nilfs2.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
Message-Id: <20230802154131.2221419-2-hch@lst.de>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent aca740ce
...@@ -1243,7 +1243,7 @@ static int test_bdev_super_fc(struct super_block *s, struct fs_context *fc) ...@@ -1243,7 +1243,7 @@ static int test_bdev_super_fc(struct super_block *s, struct fs_context *fc)
s->s_dev == *(dev_t *)fc->sget_key; s->s_dev == *(dev_t *)fc->sget_key;
} }
static int setup_bdev_super(struct super_block *sb, int sb_flags, int setup_bdev_super(struct super_block *sb, int sb_flags,
struct fs_context *fc) struct fs_context *fc)
{ {
blk_mode_t mode = sb_open_mode(sb_flags); blk_mode_t mode = sb_open_mode(sb_flags);
...@@ -1295,6 +1295,7 @@ static int setup_bdev_super(struct super_block *sb, int sb_flags, ...@@ -1295,6 +1295,7 @@ static int setup_bdev_super(struct super_block *sb, int sb_flags,
sb_set_blocksize(sb, block_size(bdev)); sb_set_blocksize(sb, block_size(bdev));
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(setup_bdev_super);
/** /**
* get_tree_bdev - Get a superblock based on a single block device * get_tree_bdev - Get a superblock based on a single block device
......
...@@ -158,6 +158,8 @@ extern int get_tree_keyed(struct fs_context *fc, ...@@ -158,6 +158,8 @@ extern int get_tree_keyed(struct fs_context *fc,
struct fs_context *fc), struct fs_context *fc),
void *key); void *key);
int setup_bdev_super(struct super_block *sb, int sb_flags,
struct fs_context *fc);
extern int get_tree_bdev(struct fs_context *fc, extern int get_tree_bdev(struct fs_context *fc,
int (*fill_super)(struct super_block *sb, int (*fill_super)(struct super_block *sb,
struct fs_context *fc)); struct fs_context *fc));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment