diff options
author | David Sterba <dsterba@suse.cz> | 2011-06-13 19:54:22 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-17 20:54:17 +0200 |
commit | 3ed4498caf381a73d6259d3ffacc914b17a507ec (patch) | |
tree | cfa41f477e31b26a602d5d2e81c52a032071e01d /fs/btrfs/tree-log.c | |
parent | Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/jos... (diff) | |
download | linux-3ed4498caf381a73d6259d3ffacc914b17a507ec.tar.xz linux-3ed4498caf381a73d6259d3ffacc914b17a507ec.zip |
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>
Diffstat (limited to '')
-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 592396c6dc47..4ce8a9f41d1e 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); |