Thread (4 messages) 4 messages, 3 authors, 2021-08-26

Re: [PATCH] btrfs: reduce return argument of btrfs_chunk_readonly

From: Nikolay Borisov <hidden>
Date: 2021-08-11 07:16:04


On 10.08.21 г. 18:48, Anand Jain wrote:
btrfs_chunk_readonly() checks if the given chunk is writeable. It returns
1 for readonly, and 0 for writeable. So the return argument type bool
shall suffice instead of the current type int.

Also, rename btrfs_chunk_readonly() to btrfs_chunk_writeable() as we check
if the bg is writeable, and helps to keep the logic at the parent function
simpler.
I don't see how the logic is kept simpler, given that you just invert
it. IMO changing the argument to bool without renaming the function is a
sufficient change and it will result in a lot smaller diff.

<snip>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help