Btrfs: fix blk_status_t/errno confusion
This fixes several instances of blk_status_t and bare errno ints being mixed up, some of which are real bugs. In the normal case, 0 matches BLK_STS_OK, so we don't observe any effects of the missing conversion, but in case of errors or passes through the repair/retry paths, the errors get mixed up. The changes were identified using 'sparse', we don't have reports of the buggy behaviour. Fixes: 4e4cbee9 ("block: switch bios to blk_status_t") Signed-off-by:Omar Sandoval <osandov@fb.com> Reviewed-by:
Liu Bo <bo.li.liu@oracle.com> Reviewed-by:
David Sterba <dsterba@suse.com> Signed-off-by:
David Sterba <dsterba@suse.com>
Showing
- fs/btrfs/disk-io.c 2 additions, 2 deletionsfs/btrfs/disk-io.c
- fs/btrfs/inode.c 37 additions, 33 deletionsfs/btrfs/inode.c
- fs/btrfs/raid56.c 17 additions, 17 deletionsfs/btrfs/raid56.c
- fs/btrfs/volumes.c 5 additions, 5 deletionsfs/btrfs/volumes.c
- fs/btrfs/volumes.h 3 additions, 3 deletionsfs/btrfs/volumes.h
Loading
Please register or sign in to comment