summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2015-08-25 02:05:13 +0200
committerDave Chinner <david@fromorbit.com>2015-08-25 02:05:13 +0200
commit2ccf4a9b18868b0900072e6d5d15a04254a07345 (patch)
treee13cc0bb8a3537b6616e59b763c05710d575a3a9 /fs/xfs/xfs_super.c
parentxfs: Fix file type directory corruption for btree directories (diff)
downloadlinux-2ccf4a9b18868b0900072e6d5d15a04254a07345.tar.xz
linux-2ccf4a9b18868b0900072e6d5d15a04254a07345.zip
xfs: collapse allocsize and biosize mount option handling
The allocsize and biosize mount options are handled identically, other than allocsize accepting suffixes. suffix_kstrtoint handles bare numbers just fine too, so these can be collapsed. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index f98ce83b7bc4..3bf503a3f57e 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -261,16 +261,8 @@ xfs_parseargs(
mp->m_rtname = kstrndup(value, MAXNAMELEN, GFP_KERNEL);
if (!mp->m_rtname)
return -ENOMEM;
- } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) {
- if (!value || !*value) {
- xfs_warn(mp, "%s option requires an argument",
- this_char);
- return -EINVAL;
- }
- if (kstrtoint(value, 10, &iosize))
- return -EINVAL;
- iosizelog = ffs(iosize) - 1;
- } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) {
+ } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE) ||
+ !strcmp(this_char, MNTOPT_BIOSIZE)) {
if (!value || !*value) {
xfs_warn(mp, "%s option requires an argument",
this_char);