From: Eric Sandeen Date: Tue, 25 Aug 2015 00:05:13 +0000 (+1000) Subject: xfs: collapse allocsize and biosize mount option handling X-Git-Tag: v4.14-rc1~4746^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ccf4a9b18868b0900072e6d5d15a04254a07345;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index f98ce83..3bf503a 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);