Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion
[sfrench/cifs-2.6.git] / fs / btrfs / inode.c
index a6bf9e2ff68f6ba196f3cae71c1cfc4262db5962..f21f4223d03b40f59d03e126d2ce6e0058dc16f7 100644 (file)
@@ -9005,13 +9005,14 @@ again:
 
        unlock_extent_cached(io_tree, page_start, page_end, &cached_state);
 
-out_unlock:
        if (!ret2) {
                btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE, true);
                sb_end_pagefault(inode->i_sb);
                extent_changeset_free(data_reserved);
                return VM_FAULT_LOCKED;
        }
+
+out_unlock:
        unlock_page(page);
 out:
        btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE, (ret != 0));