From: Zhaolei Date: Mon, 17 Aug 2015 10:44:45 +0000 (+0800) Subject: btrfs: Remove useless condition in start_log_trans() X-Git-Tag: omap-for-v4.3/fixes-rc1~86^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34eb2a524997e5cd7117569b1fda925516adf6ac;p=pandora-kernel.git btrfs: Remove useless condition in start_log_trans() Dan Carpenter reported a smatch warning for start_log_trans(): fs/btrfs/tree-log.c:178 start_log_trans() warn: we tested 'root->log_root' before and it was 'false' fs/btrfs/tree-log.c 147 if (root->log_root) { We test "root->log_root" here. ... Reason: Condition of: fs/btrfs/tree-log.c:178: if (!root->log_root) { is not necessary after commit: 7237f1833 It caused a smatch warning, and no functionally error. Fix: Deleting above condition will make smatch shut up, but a better way is to do cleanup for start_log_trans() to remove duplicated code and make code more readable. Reported-by: Dan Carpenter Signed-off-by: Zhao Lei Signed-off-by: Chris Mason --- Reading git-diff-tree failed