diff options
author | Christoph Hellwig <hch@lst.de> | 2008-09-05 16:43:31 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:07 -0400 |
commit | b214107eda845f9a5851ae198f5b972e0dc30c45 (patch) | |
tree | 9ca3127891a90b72f72477b48217d05fdfcaa83c | |
parent | a237d2a2bd67eb2b57b87c1e1d3d802d078d4ba7 (diff) |
Btrfs: trivial sparse fixes
Fix a bunch of trivial sparse complaints.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/ctree.c | 2 | ||||
-rw-r--r-- | fs/btrfs/extent_io.c | 6 | ||||
-rw-r--r-- | fs/btrfs/ioctl.c | 2 | ||||
-rw-r--r-- | fs/btrfs/sysfs.c | 8 |
4 files changed, 7 insertions, 11 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 6cd4e929bd4d..ab07557bac07 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -2749,7 +2749,6 @@ int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, | |||
2749 | BUG_ON(slot < 0); | 2749 | BUG_ON(slot < 0); |
2750 | 2750 | ||
2751 | if (slot != nritems) { | 2751 | if (slot != nritems) { |
2752 | int i; | ||
2753 | unsigned int old_data = btrfs_item_end_nr(leaf, slot); | 2752 | unsigned int old_data = btrfs_item_end_nr(leaf, slot); |
2754 | 2753 | ||
2755 | if (old_data < data_end) { | 2754 | if (old_data < data_end) { |
@@ -2913,7 +2912,6 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, | |||
2913 | nritems = btrfs_header_nritems(leaf); | 2912 | nritems = btrfs_header_nritems(leaf); |
2914 | 2913 | ||
2915 | if (slot + nr != nritems) { | 2914 | if (slot + nr != nritems) { |
2916 | int i; | ||
2917 | int data_end = leaf_data_end(root, leaf); | 2915 | int data_end = leaf_data_end(root, leaf); |
2918 | 2916 | ||
2919 | memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + | 2917 | memmove_extent_buffer(leaf, btrfs_leaf_data(leaf) + |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 7ca89c45d401..239e7c908abf 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -3400,10 +3400,8 @@ int try_release_extent_buffer(struct extent_io_tree *tree, struct page *page) | |||
3400 | } | 3400 | } |
3401 | /* at this point we can safely release the extent buffer */ | 3401 | /* at this point we can safely release the extent buffer */ |
3402 | num_pages = num_extent_pages(eb->start, eb->len); | 3402 | num_pages = num_extent_pages(eb->start, eb->len); |
3403 | for (i = 0; i < num_pages; i++) { | 3403 | for (i = 0; i < num_pages; i++) |
3404 | struct page *page = extent_buffer_page(eb, i); | 3404 | page_cache_release(extent_buffer_page(eb, i)); |
3405 | page_cache_release(page); | ||
3406 | } | ||
3407 | rb_erase(&eb->rb_node, &tree->buffer); | 3405 | rb_erase(&eb->rb_node, &tree->buffer); |
3408 | __free_extent_buffer(eb); | 3406 | __free_extent_buffer(eb); |
3409 | out: | 3407 | out: |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 59b64c738fd1..f84b5f6991cc 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -739,7 +739,7 @@ long btrfs_ioctl_trans_end(struct file *file) | |||
739 | goto out; | 739 | goto out; |
740 | } | 740 | } |
741 | btrfs_end_transaction(trans, root); | 741 | btrfs_end_transaction(trans, root); |
742 | file->private_data = 0; | 742 | file->private_data = NULL; |
743 | 743 | ||
744 | mutex_lock(&root->fs_info->trans_mutex); | 744 | mutex_lock(&root->fs_info->trans_mutex); |
745 | root->fs_info->open_ioctl_trans--; | 745 | root->fs_info->open_ioctl_trans--; |
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 1cf4f4f8d2ce..61af5d8446e3 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c | |||
@@ -254,7 +254,7 @@ void btrfs_sysfs_del_super(struct btrfs_fs_info *fs) | |||
254 | wait_for_completion(&fs->kobj_unregister); | 254 | wait_for_completion(&fs->kobj_unregister); |
255 | } | 255 | } |
256 | 256 | ||
257 | int btrfs_init_sysfs() | 257 | int btrfs_init_sysfs(void) |
258 | { | 258 | { |
259 | btrfs_kset = kset_create_and_add("btrfs", NULL, fs_kobj); | 259 | btrfs_kset = kset_create_and_add("btrfs", NULL, fs_kobj); |
260 | if (!btrfs_kset) | 260 | if (!btrfs_kset) |
@@ -262,7 +262,7 @@ int btrfs_init_sysfs() | |||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | 264 | ||
265 | void btrfs_exit_sysfs() | 265 | void btrfs_exit_sysfs(void) |
266 | { | 266 | { |
267 | kset_unregister(btrfs_kset); | 267 | kset_unregister(btrfs_kset); |
268 | } | 268 | } |
@@ -289,12 +289,12 @@ void btrfs_sysfs_del_super(struct btrfs_fs_info *fs) | |||
289 | return; | 289 | return; |
290 | } | 290 | } |
291 | 291 | ||
292 | int btrfs_init_sysfs() | 292 | int btrfs_init_sysfs(void) |
293 | { | 293 | { |
294 | return 0; | 294 | return 0; |
295 | } | 295 | } |
296 | 296 | ||
297 | void btrfs_exit_sysfs() | 297 | void btrfs_exit_sysfs(void) |
298 | { | 298 | { |
299 | return; | 299 | return; |
300 | } | 300 | } |