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/relocation.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/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 199a80134312..fed0aaec0753 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -3220,7 +3220,7 @@ static int delete_block_group_cache(struct btrfs_fs_info *fs_info, | |||
3220 | key.offset = 0; | 3220 | key.offset = 0; |
3221 | 3221 | ||
3222 | inode = btrfs_iget(fs_info->sb, &key, root, NULL); | 3222 | inode = btrfs_iget(fs_info->sb, &key, root, NULL); |
3223 | if (!inode || IS_ERR(inode) || is_bad_inode(inode)) { | 3223 | if (IS_ERR_OR_NULL(inode) || is_bad_inode(inode)) { |
3224 | if (inode && !IS_ERR(inode)) | 3224 | if (inode && !IS_ERR(inode)) |
3225 | iput(inode); | 3225 | iput(inode); |
3226 | return -ENOENT; | 3226 | return -ENOENT; |