1
linux/fs/btrfs
Filipe Manana ecb54277cb btrfs: fix uninitialized return value from btrfs_reclaim_sweep()
The return variable 'ret' at btrfs_reclaim_sweep() is never assigned if
none of the space infos is reclaimable (for example if periodic reclaim
is disabled, which is the default), so we return an undefined value.

This can be fixed my making btrfs_reclaim_sweep() not return any value
as well as do_reclaim_sweep() because:

1) do_reclaim_sweep() always returns 0, so we can make it return void;

2) The only caller of btrfs_reclaim_sweep() (btrfs_reclaim_bgs()) doesn't
   care about its return value, and in its context there's nothing to do
   about any errors anyway.

Therefore remove the return value from btrfs_reclaim_sweep() and
do_reclaim_sweep().

Fixes: e4ca3932ae ("btrfs: periodic block_group reclaim")
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-08-27 16:42:09 +02:00
..
tests btrfs: fix corrupt read due to bad offset of a compressed extent map 2024-07-25 23:54:06 +02:00
accessors.c
accessors.h btrfs: remove raid-stripe-tree encoding field from stripe_extent 2024-07-11 15:33:28 +02:00
acl.c
acl.h
async-thread.c
async-thread.h
backref.c
backref.h
bio.c btrfs: fix a use-after-free when hitting errors inside btrfs_submit_chunk() 2024-08-27 01:34:08 +02:00
bio.h
block-group.c btrfs: zoned: fix zone_unusable accounting on making block group read-write again 2024-07-29 19:21:19 +02:00
block-group.h btrfs: switch btrfs_block_group::inode to struct btrfs_inode 2024-07-11 15:33:28 +02:00
block-rsv.c
block-rsv.h
btrfs_inode.h btrfs: move the direct IO code into its own file 2024-07-11 15:33:29 +02:00
compression.c btrfs: fix extent map use-after-free when adding pages to compressed bio 2024-07-11 16:32:22 +02:00
compression.h btrfs: pass a btrfs_inode to btrfs_compress_heuristic() 2024-07-11 15:33:28 +02:00
ctree.c btrfs: fix data race when accessing the last_trans field of a root 2024-07-11 15:52:25 +02:00
ctree.h btrfs: fix corruption after buffer fault in during direct IO append write 2024-07-29 19:21:22 +02:00
defrag.c btrfs: fix data race when accessing the last_trans field of a root 2024-07-11 15:52:25 +02:00
defrag.h
delalloc-space.c btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
delalloc-space.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
delayed-inode.c btrfs: pass a btrfs_inode to btrfs_readdir_get_delayed_items() 2024-07-11 15:33:28 +02:00
delayed-inode.h btrfs: pass a btrfs_inode to btrfs_readdir_get_delayed_items() 2024-07-11 15:33:28 +02:00
delayed-ref.c btrfs: check delayed refs when we're checking if a ref exists 2024-08-13 13:42:26 +02:00
delayed-ref.h btrfs: check delayed refs when we're checking if a ref exists 2024-08-13 13:42:26 +02:00
dev-replace.c btrfs: simplify range parameters of btrfs_wait_ordered_roots() 2024-07-11 15:33:19 +02:00
dev-replace.h
dir-item.c btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
dir-item.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
direct-io.c btrfs: fix corruption after buffer fault in during direct IO append write 2024-07-29 19:21:22 +02:00
direct-io.h btrfs: move the direct IO code into its own file 2024-07-11 15:33:29 +02:00
discard.c
discard.h
disk-io.c for-6.11-tag 2024-07-17 12:38:04 -07:00
disk-io.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
export.c btrfs: remove super block argument from btrfs_iget() 2024-07-11 15:33:25 +02:00
export.h
extent_io.c btrfs: fix invalid mapping of extent xarray state 2024-08-13 15:36:57 +02:00
extent_io.h btrfs: move extent_range_clear_dirty_for_io() into inode.c 2024-07-11 15:52:25 +02:00
extent_map.c btrfs: only run the extent map shrinker from kswapd tasks 2024-08-13 13:43:28 +02:00
extent_map.h btrfs: do not directly include rwlock_types.h 2024-07-11 15:33:22 +02:00
extent-io-tree.c btrfs: preallocate ulist memory for qgroup rsv 2024-07-11 15:33:26 +02:00
extent-io-tree.h
extent-tree.c btrfs: check delayed refs when we're checking if a ref exists 2024-08-13 13:42:26 +02:00
extent-tree.h btrfs: do not BUG_ON() when freeing tree block after error 2024-07-11 15:33:26 +02:00
fiemap.c btrfs: initialize last_extent_end to fix -Wmaybe-uninitialized warning in extent_fiemap() 2024-08-26 16:58:13 +02:00
fiemap.h btrfs: move fiemap code into its own file 2024-07-11 15:33:20 +02:00
file-item.c btrfs: introduce new "rescue=ignoremetacsums" mount option 2024-07-11 15:33:29 +02:00
file-item.h
file.c btrfs: fix double inode unlock for direct IO sync writes 2024-08-02 22:32:40 +02:00
file.h btrfs: move the direct IO code into its own file 2024-07-11 15:33:29 +02:00
free-space-cache.c btrfs: zoned: properly take lock to read/update block group's zoned variables 2024-08-15 20:35:56 +02:00
free-space-cache.h
free-space-tree.c btrfs: do not BUG_ON() when freeing tree block after error 2024-07-11 15:33:26 +02:00
free-space-tree.h
fs.c
fs.h for-6.11-tag 2024-07-19 14:34:52 -07:00
inode-item.c btrfs: abort transaction if we don't find extref in btrfs_del_inode_extref() 2024-07-11 15:33:27 +02:00
inode-item.h
inode.c btrfs: update target inode's ctime on unlink 2024-08-15 20:35:44 +02:00
ioctl.c for-6.11-tag 2024-07-17 12:38:04 -07:00
ioctl.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
Kconfig
locking.c
locking.h btrfs: cleanup recursive include of the same header 2024-07-11 15:33:22 +02:00
lru_cache.c
lru_cache.h btrfs: cleanup recursive include of the same header 2024-07-11 15:33:22 +02:00
lzo.c btrfs: enhance compression error messages 2024-07-11 15:52:25 +02:00
Makefile btrfs: move the direct IO code into its own file 2024-07-11 15:33:29 +02:00
messages.c btrfs: introduce new "rescue=ignoremetacsums" mount option 2024-07-11 15:33:29 +02:00
messages.h
misc.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
ordered-data.c btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inode 2024-07-11 15:33:28 +02:00
ordered-data.h btrfs: switch btrfs_ordered_extent::inode to struct btrfs_inode 2024-07-11 15:33:28 +02:00
orphan.c
orphan.h
print-tree.c btrfs: avoid using fixed char array size for tree names 2024-08-02 22:44:27 +02:00
print-tree.h
props.c btrfs: pass a btrfs_inode to btrfs_set_prop() 2024-07-11 15:33:29 +02:00
props.h btrfs: pass a btrfs_inode to btrfs_set_prop() 2024-07-11 15:33:29 +02:00
qgroup.c btrfs: run delayed iputs when flushing delalloc 2024-08-25 19:15:34 +02:00
qgroup.h btrfs: qgroup: preallocate memory before adding a relation 2024-07-11 15:33:27 +02:00
raid56.c btrfs: rename the extra_gfp parameter of btrfs_alloc_page_array() 2024-07-11 15:33:30 +02:00
raid56.h
raid-stripe-tree.c btrfs: remove raid-stripe-tree encoding field from stripe_extent 2024-07-11 15:33:28 +02:00
raid-stripe-tree.h btrfs: remove raid-stripe-tree encoding field from stripe_extent 2024-07-11 15:33:28 +02:00
rcu-string.h
ref-verify.c btrfs: fix uninitialized return value in the ref-verify tool 2024-07-02 19:14:57 +02:00
ref-verify.h
reflink.c btrfs: pass a btrfs_inode to btrfs_wait_ordered_range() 2024-07-11 15:33:18 +02:00
reflink.h
relocation.c - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
relocation.h
root-tree.c
root-tree.h
scrub.c btrfs: scrub: update last_physical after scrubbing one stripe 2024-08-01 17:15:07 +02:00
scrub.h
send.c btrfs: send: annotate struct name_cache_entry with __counted_by() 2024-08-15 20:35:32 +02:00
send.h btrfs: pass a btrfs_inode to btrfs_ioctl_send() 2024-07-11 15:33:28 +02:00
space-info.c btrfs: fix uninitialized return value from btrfs_reclaim_sweep() 2024-08-27 16:42:09 +02:00
space-info.h btrfs: fix uninitialized return value from btrfs_reclaim_sweep() 2024-08-27 16:42:09 +02:00
subpage.c btrfs: pass a btrfs_inode to is_data_inode() 2024-07-11 15:33:28 +02:00
subpage.h btrfs: subpage: introduce helpers to handle subpage delalloc locking 2024-07-11 15:33:22 +02:00
super.c btrfs: only enable extent map shrinker for DEBUG builds 2024-08-16 21:22:39 +02:00
super.h btrfs: change BTRFS_MOUNT_* flags to 64bit type 2024-07-19 17:20:23 +02:00
sysfs.c btrfs: introduce new "rescue=ignoresuperflags" mount option 2024-07-11 15:33:30 +02:00
sysfs.h
transaction.c btrfs: fix data race when accessing the last_trans field of a root 2024-07-11 15:52:25 +02:00
transaction.h btrfs: switch btrfs_pending_snapshot::dir to btrfs_inode 2024-07-11 15:33:28 +02:00
tree-checker.c btrfs: tree-checker: add dev extent item checks 2024-08-15 20:35:52 +02:00
tree-checker.h
tree-log.c btrfs: remove super block argument from btrfs_iget() 2024-07-11 15:33:25 +02:00
tree-log.h btrfs: avoid transaction commit on any fsync after subvolume creation 2024-07-11 15:33:24 +02:00
tree-mod-log.c
tree-mod-log.h
ulist.c btrfs: preallocate ulist memory for qgroup rsv 2024-07-11 15:33:26 +02:00
ulist.h btrfs: preallocate ulist memory for qgroup rsv 2024-07-11 15:33:26 +02:00
uuid-tree.c btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
uuid-tree.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
verity.c
verity.h
volumes.c btrfs: abort transaction on errors in btrfs_free_chunk() 2024-07-11 15:33:27 +02:00
volumes.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
xattr.c btrfs: pass a btrfs_inode to btrfs_set_prop() 2024-07-11 15:33:29 +02:00
xattr.h btrfs: constify pointer parameters where applicable 2024-07-11 15:33:22 +02:00
zlib.c btrfs: enhance compression error messages 2024-07-11 15:52:25 +02:00
zoned.c btrfs: change BTRFS_MOUNT_* flags to 64bit type 2024-07-19 17:20:23 +02:00
zoned.h btrfs: change BTRFS_MOUNT_* flags to 64bit type 2024-07-19 17:20:23 +02:00
zstd.c btrfs: enhance compression error messages 2024-07-11 15:52:25 +02:00