diff options
author | Josef Bacik <josef@redhat.com> | 2012-01-13 01:10:12 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-01-16 21:28:54 +0100 |
commit | ec39e180fd3188c983c94603634bfcd019f42ae7 (patch) | |
tree | baf6a56fb98735cc533b6a5bb9c29a364a6c0cf3 /fs/btrfs/inode.c | |
parent | Btrfs: fix btrfsck error 400 when truncating a compressed (diff) | |
download | linux-ec39e180fd3188c983c94603634bfcd019f42ae7.tar.xz linux-ec39e180fd3188c983c94603634bfcd019f42ae7.zip |
Btrfs: release space on error in page_mkwrite
If updating the inode gave us an ENOSPC we were just returning in page_mkwrite,
which is a problem since we make our reservation right before trying to update
the inode, so fix the out label so that we actually free our reservation.
Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 946a7f1b3295..85fd86ea9830 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6488,8 +6488,8 @@ out_unlock: if (!ret) return VM_FAULT_LOCKED; unlock_page(page); - btrfs_delalloc_release_space(inode, PAGE_CACHE_SIZE); out: + btrfs_delalloc_release_space(inode, PAGE_CACHE_SIZE); return ret; } |