diff mbox series

Remove unnecessary condition check

Message ID 6077041.Lag4Zllvab@archlinux (mailing list archive)
State New, archived
Headers show
Series Remove unnecessary condition check | expand

Commit Message

Diego Calleja Aug. 12, 2019, 5:38 p.m. UTC
extent_io.c:__extent_writepage_io has this code:

if (!compressed)
	...
else if (compressed)


Signed-off-by: Diego Calleja <diegocg@gmail.com>
---
 fs/btrfs/extent_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nikolay Borisov Aug. 12, 2019, 6:13 p.m. UTC | #1
On 12.08.19 г. 20:38 ч., Diego Calleja wrote:
> extent_io.c:__extent_writepage_io has this code:
> 
> if (!compressed)
> 	...
> else if (compressed)
> 
> 
> Signed-off-by: Diego Calleja <diegocg@gmail.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> ---
>  fs/btrfs/extent_io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 1ff438fd5bc2..a53fb7b8a262 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -3498,7 +3498,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
>  				btrfs_writepage_endio_finish_ordered(page, cur,
>  							    cur + iosize - 1,
>  							    1);
> -			else if (compressed) {
> +			else {
>  				/* we don't want to end_page_writeback on
>  				 * a compressed extent.  this happens
>  				 * elsewhere
>
diff mbox series

Patch

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 1ff438fd5bc2..a53fb7b8a262 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3498,7 +3498,7 @@  static noinline_for_stack int __extent_writepage_io(struct inode *inode,
 				btrfs_writepage_endio_finish_ordered(page, cur,
 							    cur + iosize - 1,
 							    1);
-			else if (compressed) {
+			else {
 				/* we don't want to end_page_writeback on
 				 * a compressed extent.  this happens
 				 * elsewhere