From: Ian Kent Date: Mon, 4 Nov 2019 21:58:44 +0000 (-0800) Subject: xfs: avoid redundant checks when options is empty X-Git-Tag: v5.5-rc1~71^2~110 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=846410ccd104c7294d18e61c665bf7c0c7e6d7d1;p=linux.git xfs: avoid redundant checks when options is empty When options passed to xfs_parseargs() is NULL the checks performed after taking the branch are made with the initial values of dsunit, dswidth and iosizelog. But all the checks do nothing in this case so return immediately instead. Signed-off-by: Ian Kent Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 0dc072700599..17188a9ed541 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -199,7 +199,7 @@ xfs_parseargs( mp->m_allocsize_log = 16; /* 64k */ if (!options) - goto done; + return 0; while ((p = strsep(&options, ",")) != NULL) { int token; @@ -379,7 +379,6 @@ xfs_parseargs( return -EINVAL; } -done: if (mp->m_logbufs != -1 && mp->m_logbufs != 0 && (mp->m_logbufs < XLOG_MIN_ICLOGS ||