diff options
author | David Sterba <dsterba@suse.cz> | 2011-04-19 18:00:01 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-05-02 13:57:20 +0200 |
commit | c704005d886cf0bc9bc3974eb009b22fe0da32c7 (patch) | |
tree | b9effb8d686af95ca92782697b75a70bf34a3964 /fs/btrfs/file.c | |
parent | 4891aca2dac612a2f21a3278d9906ade13b55788 (diff) | |
download | linux-stable-c704005d886cf0bc9bc3974eb009b22fe0da32c7.tar.gz linux-stable-c704005d886cf0bc9bc3974eb009b22fe0da32c7.tar.bz2 linux-stable-c704005d886cf0bc9bc3974eb009b22fe0da32c7.zip |
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/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 75899a01dded..83abd274370b 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1375,7 +1375,7 @@ static long btrfs_fallocate(struct file *file, int mode, while (1) { em = btrfs_get_extent(inode, NULL, 0, cur_offset, alloc_end - cur_offset, 0); - BUG_ON(IS_ERR(em) || !em); + BUG_ON(IS_ERR_OR_NULL(em)); last_byte = min(extent_map_end(em), alloc_end); last_byte = (last_byte + mask) & ~mask; if (em->block_start == EXTENT_MAP_HOLE || |