diff options
author | David Sterba <dsterba@suse.cz> | 2011-04-19 12:00:01 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-05-02 07:57:20 -0400 |
commit | c704005d886cf0bc9bc3974eb009b22fe0da32c7 (patch) | |
tree | b9effb8d686af95ca92782697b75a70bf34a3964 /fs/btrfs/tree-log.c | |
parent | 4891aca2dac612a2f21a3278d9906ade13b55788 (diff) |
btrfs: unify checking of IS_ERR and null
use IS_ERR_OR_NULL when possible, done by this coccinelle script:
@ match @
identifier id;
@@
(
- BUG_ON(IS_ERR(id) || !id);
+ BUG_ON(IS_ERR_OR_NULL(id));
|
- IS_ERR(id) || !id
+ IS_ERR_OR_NULL(id)
|
- !id || IS_ERR(id)
+ IS_ERR_OR_NULL(id)
)
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f997ec0c1ba4..d5313d63f967 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -1205,7 +1205,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, | |||
1205 | } else { | 1205 | } else { |
1206 | BUG(); | 1206 | BUG(); |
1207 | } | 1207 | } |
1208 | if (!dst_di || IS_ERR(dst_di)) { | 1208 | if (IS_ERR_OR_NULL(dst_di)) { |
1209 | /* we need a sequence number to insert, so we only | 1209 | /* we need a sequence number to insert, so we only |
1210 | * do inserts for the BTRFS_DIR_INDEX_KEY types | 1210 | * do inserts for the BTRFS_DIR_INDEX_KEY types |
1211 | */ | 1211 | */ |
@@ -1426,7 +1426,7 @@ again: | |||
1426 | dir_key->offset, | 1426 | dir_key->offset, |
1427 | name, name_len, 0); | 1427 | name, name_len, 0); |
1428 | } | 1428 | } |
1429 | if (!log_di || IS_ERR(log_di)) { | 1429 | if (IS_ERR_OR_NULL(log_di)) { |
1430 | btrfs_dir_item_key_to_cpu(eb, di, &location); | 1430 | btrfs_dir_item_key_to_cpu(eb, di, &location); |
1431 | btrfs_release_path(root, path); | 1431 | btrfs_release_path(root, path); |
1432 | btrfs_release_path(log, log_path); | 1432 | btrfs_release_path(log, log_path); |