diff options
author | Zhaolei <zhaolei@cn.fujitsu.com> | 2015-08-17 18:44:45 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-08-19 14:24:49 -0700 |
commit | 34eb2a524997e5cd7117569b1fda925516adf6ac (patch) | |
tree | b7d17e3f6a4e78fc51acac6a9260ee901536de05 /fs/xfs/xfs_iomap.c | |
parent | 46cd28555ffaa40162290dba203daad0ff6f7abd (diff) | |
download | op-kernel-dev-34eb2a524997e5cd7117569b1fda925516adf6ac.zip op-kernel-dev-34eb2a524997e5cd7117569b1fda925516adf6ac.tar.gz |
btrfs: Remove useless condition in start_log_trans()
Dan Carpenter <dan.carpenter@oracle.com> 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 <dan.carpenter@oracle.com>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
0 files changed, 0 insertions, 0 deletions