mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
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 <raven@themaw.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
c0a6791667
commit
846410ccd1
@ -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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user