]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Btrfs: cleanup unused cached_state in __extent_writepage_io
authorLiu Bo <bo.li.liu@oracle.com>
Thu, 26 Jan 2017 01:15:54 +0000 (17:15 -0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 14:50:59 +0000 (15:50 +0100)
@cached_state is no more required in __extent_writepage_io, also remove
the goto label.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index 9359c1b7ccb8e214b2612a8afe4a8bb0fcc56fb5..69c054000f0857707630ca513b90bca24d1ad43f 100644 (file)
@@ -3335,7 +3335,6 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
        u64 block_start;
        u64 iosize;
        sector_t sector;
-       struct extent_state *cached_state = NULL;
        struct extent_map *em;
        struct block_device *bdev;
        size_t pg_offset = 0;
@@ -3356,8 +3355,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
 
                        update_nr_written(page, wbc, nr_written);
                        unlock_page(page);
-                       ret = 1;
-                       goto done_unlocked;
+                       return 1;
                }
        }
 
@@ -3459,11 +3457,6 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
        }
 done:
        *nr_ret = nr;
-
-done_unlocked:
-
-       /* drop our reference on any cached states */
-       free_extent_state(cached_state);
        return ret;
 }