Commit 76de60ed authored by Yunfeng Ye's avatar Yunfeng Ye Committed by David Sterba

btrfs: remove unused condition check in btrfs_page_mkwrite()

The condition '!ret2' is always true. commit 717beb96 ("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: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarYunfeng Ye <yeyunfeng@huawei.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 36ee0b44
...@@ -9099,7 +9099,6 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf) ...@@ -9099,7 +9099,6 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf)
ret = VM_FAULT_SIGBUS; ret = VM_FAULT_SIGBUS;
goto out_unlock; goto out_unlock;
} }
ret2 = 0;
/* page is wholly or partially inside EOF */ /* page is wholly or partially inside EOF */
if (page_start + PAGE_SIZE > size) if (page_start + PAGE_SIZE > size)
...@@ -9123,12 +9122,10 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf) ...@@ -9123,12 +9122,10 @@ vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf)
unlock_extent_cached(io_tree, page_start, page_end, &cached_state); unlock_extent_cached(io_tree, page_start, page_end, &cached_state);
if (!ret2) { btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE);
btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE); sb_end_pagefault(inode->i_sb);
sb_end_pagefault(inode->i_sb); extent_changeset_free(data_reserved);
extent_changeset_free(data_reserved); return VM_FAULT_LOCKED;
return VM_FAULT_LOCKED;
}
out_unlock: out_unlock:
unlock_page(page); unlock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment