]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: optimize bad declarations and redundant assignment
authorNorton.Zhu <norton.zhu@huawei.com>
Thu, 14 Jan 2016 23:17:09 +0000 (15:17 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
commit025acec124c2081f45665575c7dfde8232859030
tree7a6fcc72a9ad8f328901a30291ce7a4d224d56b1
parent01b76e4798a2c100d504cecc7b4f5c538a1aae71
ocfs2: optimize bad declarations and redundant assignment

In ocfs2_parse_options,

a) it's better to declare variables(small size) outside of while loop;

b) 'option' will be set by match_int, 'option = 0;' makes no sense, if
   match_int failed, it just goto bail and return.

Signed-off-by: Norton.Zhu <norton.zhu@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Gang He <ghe@suse.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Acked-by: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/super.c