diff options
author | Yunfeng Ye <yeyunfeng@huawei.com> | 2019-12-03 09:59:25 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-01-20 16:40:51 +0100 |
commit | 76de60ed044f26f0ab62c2f752cb3d0eade2cde0 (patch) | |
tree | a8a06b31b26458eabe0bce38ba5059356db34125 /fs | |
parent | btrfs: Remove redundant WARN_ON in walk_down_log_tree (diff) | |
download | linux-76de60ed044f26f0ab62c2f752cb3d0eade2cde0.tar.xz linux-76de60ed044f26f0ab62c2f752cb3d0eade2cde0.zip |
btrfs: remove unused condition check in btrfs_page_mkwrite()
The condition '!ret2' is always true. commit 717beb96d969 ("Btrfs: fix
regression in btrfs_page_mkwrite() from vm_fault_t conversion") left
behind the check after moving this code out of the goto, so remove the
unused condition check.
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c1cee6a01c35..73c148eaae9f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9099,7 +9099,6 @@ again: ret = VM_FAULT_SIGBUS; goto out_unlock; } - ret2 = 0; /* page is wholly or partially inside EOF */ if (page_start + PAGE_SIZE > size) @@ -9123,12 +9122,10 @@ again: unlock_extent_cached(io_tree, page_start, page_end, &cached_state); - if (!ret2) { - btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE); - sb_end_pagefault(inode->i_sb); - extent_changeset_free(data_reserved); - return VM_FAULT_LOCKED; - } + btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE); + sb_end_pagefault(inode->i_sb); + extent_changeset_free(data_reserved); + return VM_FAULT_LOCKED; out_unlock: unlock_page(page); |