]> git.hungrycats.org Git - linux/commitdiff
btrfs: remove unused condition check in btrfs_page_mkwrite()
authorYunfeng Ye <yeyunfeng@huawei.com>
Tue, 3 Dec 2019 08:59:25 +0000 (16:59 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 6 Dec 2019 15:26:58 +0000 (16:26 +0100)
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>
fs/btrfs/inode.c

index a09ba341868f94590df10fa936b4f90082d74ab1..fec2a78de03744b5d41ee59fa15720cd913b07f4 100644 (file)
@@ -9076,7 +9076,6 @@ again:
                ret = VM_FAULT_SIGBUS;
                goto out_unlock;
        }
-       ret2 = 0;
 
        /* page is wholly or partially inside EOF */
        if (page_start + PAGE_SIZE > size)
@@ -9100,12 +9099,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);