diff options
author | David Sterba <dsterba@suse.cz> | 2011-06-13 17:54:22 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-17 14:54:17 -0400 |
commit | 3ed4498caf381a73d6259d3ffacc914b17a507ec (patch) | |
tree | cfa41f477e31b26a602d5d2e81c52a032071e01d | |
parent | e038dca803423bb7a3fa9a162b7dcc225efe9bf9 (diff) | |
download | op-kernel-dev-3ed4498caf381a73d6259d3ffacc914b17a507ec.zip op-kernel-dev-3ed4498caf381a73d6259d3ffacc914b17a507ec.tar.gz |
btrfs: fix dereference of ERR_PTR value
smatch reports:
btrfs_recover_log_trees error: 'wc.replay_dest' dereferencing
possible ERR_PTR()
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/tree-log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 592396c..4ce8a9f 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3177,7 +3177,7 @@ again: tmp_key.offset = (u64)-1; wc.replay_dest = btrfs_read_fs_root_no_name(fs_info, &tmp_key); - BUG_ON(!wc.replay_dest); + BUG_ON(IS_ERR_OR_NULL(wc.replay_dest)); wc.replay_dest->log_root = log; btrfs_record_root_in_trans(trans, wc.replay_dest); |