summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorAl Viro2018-07-30 00:04:46 +0200
committerDavid Sterba2018-08-06 13:13:02 +0200
commit8d9e220ca0844bf75b98cb5b8e2c25d203c0d0f6 (patch)
treecd43d2412db0f5ee0b34642b11711229bb12f068 /fs/btrfs/tree-log.c
parentbtrfs: btrfs_iget never returns an is_bad_inode inode (diff)
downloadkernel-qcow2-linux-8d9e220ca0844bf75b98cb5b8e2c25d203c0d0f6.tar.gz
kernel-qcow2-linux-8d9e220ca0844bf75b98cb5b8e2c25d203c0d0f6.tar.xz
kernel-qcow2-linux-8d9e220ca0844bf75b98cb5b8e2c25d203c0d0f6.zip
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.c5
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:
dir_key->offset,
name, name_len, 0);
}
- if (!log_di || (IS_ERR(log_di) && PTR_ERR(log_di) == -ENOENT)) {
+ if (!log_di || log_di == ERR_PTR(-ENOENT)) {
btrfs_dir_item_key_to_cpu(eb, di, &location);
btrfs_release_path(path);
btrfs_release_path(log_path);
@@ -5011,8 +5011,7 @@ again:
* we don't need to do more work nor fallback to
* a transaction commit.
*/
- if (IS_ERR(other_inode) &&
- PTR_ERR(other_inode) == -ENOENT) {
+ if (other_inode == ERR_PTR(-ENOENT)) {
goto next_key;
} else if (IS_ERR(other_inode)) {
err = PTR_ERR(other_inode);