diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-29 18:04:46 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 07:13:02 -0400 |
commit | 8d9e220ca0844bf75b98cb5b8e2c25d203c0d0f6 (patch) | |
tree | cd43d2412db0f5ee0b34642b11711229bb12f068 /fs/btrfs/tree-log.c | |
parent | 2e19f1f9d31b3515356710b8bdfb655f47a98448 (diff) |
btrfs: simplify IS_ERR/PTR_ERR checks
IS_ERR(p) && PTR_ERR(p) == n is a weird way to spell p == ERR_PTR(n).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 730b97dee955..1650dc44a5e3 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -2181,7 +2181,7 @@ again: | |||
2181 | dir_key->offset, | 2181 | dir_key->offset, |
2182 | name, name_len, 0); | 2182 | name, name_len, 0); |
2183 | } | 2183 | } |
2184 | if (!log_di || (IS_ERR(log_di) && PTR_ERR(log_di) == -ENOENT)) { | 2184 | if (!log_di || log_di == ERR_PTR(-ENOENT)) { |
2185 | btrfs_dir_item_key_to_cpu(eb, di, &location); | 2185 | btrfs_dir_item_key_to_cpu(eb, di, &location); |
2186 | btrfs_release_path(path); | 2186 | btrfs_release_path(path); |
2187 | btrfs_release_path(log_path); | 2187 | btrfs_release_path(log_path); |
@@ -5011,8 +5011,7 @@ again: | |||
5011 | * we don't need to do more work nor fallback to | 5011 | * we don't need to do more work nor fallback to |
5012 | * a transaction commit. | 5012 | * a transaction commit. |
5013 | */ | 5013 | */ |
5014 | if (IS_ERR(other_inode) && | 5014 | if (other_inode == ERR_PTR(-ENOENT)) { |
5015 | PTR_ERR(other_inode) == -ENOENT) { | ||
5016 | goto next_key; | 5015 | goto next_key; |
5017 | } else if (IS_ERR(other_inode)) { | 5016 | } else if (IS_ERR(other_inode)) { |
5018 | err = PTR_ERR(other_inode); | 5017 | err = PTR_ERR(other_inode); |