diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2011-02-21 21:01:42 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-02-21 21:01:42 -0500 |
commit | 7dc576158d7e5cdff3349f78598fdb4080536342 (patch) | |
tree | e7be15a8ee8add729915c81e9cb39cd55d6b572d /fs/ext4/extents.c | |
parent | da488945f4bf4096f4ab6091938469bd8822cfec (diff) |
ext4: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing the offending 0s with NULL.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index ccce8a7e94ed..d16f6b5a140b 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -1034,7 +1034,7 @@ cleanup: | |||
1034 | for (i = 0; i < depth; i++) { | 1034 | for (i = 0; i < depth; i++) { |
1035 | if (!ablocks[i]) | 1035 | if (!ablocks[i]) |
1036 | continue; | 1036 | continue; |
1037 | ext4_free_blocks(handle, inode, 0, ablocks[i], 1, | 1037 | ext4_free_blocks(handle, inode, NULL, ablocks[i], 1, |
1038 | EXT4_FREE_BLOCKS_METADATA); | 1038 | EXT4_FREE_BLOCKS_METADATA); |
1039 | } | 1039 | } |
1040 | } | 1040 | } |
@@ -2059,7 +2059,7 @@ static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode, | |||
2059 | if (err) | 2059 | if (err) |
2060 | return err; | 2060 | return err; |
2061 | ext_debug("index is empty, remove it, free block %llu\n", leaf); | 2061 | ext_debug("index is empty, remove it, free block %llu\n", leaf); |
2062 | ext4_free_blocks(handle, inode, 0, leaf, 1, | 2062 | ext4_free_blocks(handle, inode, NULL, leaf, 1, |
2063 | EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET); | 2063 | EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET); |
2064 | return err; | 2064 | return err; |
2065 | } | 2065 | } |
@@ -2156,7 +2156,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode, | |||
2156 | num = le32_to_cpu(ex->ee_block) + ee_len - from; | 2156 | num = le32_to_cpu(ex->ee_block) + ee_len - from; |
2157 | start = ext4_ext_pblock(ex) + ee_len - num; | 2157 | start = ext4_ext_pblock(ex) + ee_len - num; |
2158 | ext_debug("free last %u blocks starting %llu\n", num, start); | 2158 | ext_debug("free last %u blocks starting %llu\n", num, start); |
2159 | ext4_free_blocks(handle, inode, 0, start, num, flags); | 2159 | ext4_free_blocks(handle, inode, NULL, start, num, flags); |
2160 | } else if (from == le32_to_cpu(ex->ee_block) | 2160 | } else if (from == le32_to_cpu(ex->ee_block) |
2161 | && to <= le32_to_cpu(ex->ee_block) + ee_len - 1) { | 2161 | && to <= le32_to_cpu(ex->ee_block) + ee_len - 1) { |
2162 | printk(KERN_INFO "strange request: removal %u-%u from %u:%u\n", | 2162 | printk(KERN_INFO "strange request: removal %u-%u from %u:%u\n", |
@@ -3485,7 +3485,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | |||
3485 | /* not a good idea to call discard here directly, | 3485 | /* not a good idea to call discard here directly, |
3486 | * but otherwise we'd need to call it every free() */ | 3486 | * but otherwise we'd need to call it every free() */ |
3487 | ext4_discard_preallocations(inode); | 3487 | ext4_discard_preallocations(inode); |
3488 | ext4_free_blocks(handle, inode, 0, ext4_ext_pblock(&newex), | 3488 | ext4_free_blocks(handle, inode, NULL, ext4_ext_pblock(&newex), |
3489 | ext4_ext_get_actual_len(&newex), 0); | 3489 | ext4_ext_get_actual_len(&newex), 0); |
3490 | goto out2; | 3490 | goto out2; |
3491 | } | 3491 | } |