mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
btrfs: remove unused setup_root_args()
Since setup_root_args() is not used anymore, just remove it. Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d740760656
commit
83085935cc
1 changed files with 0 additions and 36 deletions
|
@ -1407,42 +1407,6 @@ static inline int is_subvolume_inode(struct inode *inode)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* This will add subvolid=0 to the argument string while removing any subvol=
|
|
||||||
* and subvolid= arguments to make sure we get the top-level root for path
|
|
||||||
* walking to the subvol we want.
|
|
||||||
*/
|
|
||||||
static char *setup_root_args(char *args)
|
|
||||||
{
|
|
||||||
char *buf, *dst, *sep;
|
|
||||||
|
|
||||||
if (!args)
|
|
||||||
return kstrdup("subvolid=0", GFP_KERNEL);
|
|
||||||
|
|
||||||
/* The worst case is that we add ",subvolid=0" to the end. */
|
|
||||||
buf = dst = kmalloc(strlen(args) + strlen(",subvolid=0") + 1,
|
|
||||||
GFP_KERNEL);
|
|
||||||
if (!buf)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
sep = strchrnul(args, ',');
|
|
||||||
if (!strstarts(args, "subvol=") &&
|
|
||||||
!strstarts(args, "subvolid=")) {
|
|
||||||
memcpy(dst, args, sep - args);
|
|
||||||
dst += sep - args;
|
|
||||||
*dst++ = ',';
|
|
||||||
}
|
|
||||||
if (*sep)
|
|
||||||
args = sep + 1;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
strcpy(dst, "subvolid=0");
|
|
||||||
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid,
|
static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid,
|
||||||
int flags, const char *device_name,
|
int flags, const char *device_name,
|
||||||
char *data, struct vfsmount *mnt)
|
char *data, struct vfsmount *mnt)
|
||||||
|
|
Loading…
Reference in a new issue