mount_utils: kill mount_filesystem()

We have way better helpers now. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 0d50f288
......@@ -116,30 +116,6 @@ int mnt_attributes_old(unsigned int new_flags, unsigned int *old_flags)
return new_flags;
}
int mount_filesystem(const char *fs_name, const char *path, unsigned int attr_flags)
{
__do_close int fsfd = -EBADF;
unsigned int old_flags = 0;
fsfd = fsopen(fs_name, FSOPEN_CLOEXEC);
if (fsfd >= 0) {
__do_close int mfd = -EBADF;
if (fsconfig(fsfd, FSCONFIG_CMD_CREATE, NULL, NULL, 0))
return -1;
mfd = fsmount(fsfd, FSMOUNT_CLOEXEC, attr_flags);
if (mfd < 0)
return -1;
return move_mount(mfd, "", AT_FDCWD, path, MOVE_MOUNT_F_EMPTY_PATH);
}
TRACE("Falling back to old mount api");
mnt_attributes_old(attr_flags, &old_flags);
return mount("none", path, fs_name, old_flags, NULL);
}
static int __fs_prepare(const char *fs_name, int fd_from)
{
__do_close int fd_fs = -EBADF;
......
......@@ -156,8 +156,6 @@ __hidden extern int mnt_attributes_new(unsigned int old_flags, unsigned int *new
__hidden extern int mnt_attributes_old(unsigned int new_flags, unsigned int *old_flags);
__hidden extern int mount_filesystem(const char *fs_name, const char *path, unsigned int attr_flags);
__hidden extern int fs_prepare(const char *fs_name, int dfd_from,
const char *path_from, __u64 o_flags_from,
__u64 resolve_flags_from);
......
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