]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: fix reservations in btrfs_page_mkwrite
authorChris Mason <chris.mason@oracle.com>
Wed, 25 Jan 2012 18:47:40 +0000 (13:47 -0500)
committerGuru Anbalagane <guru.anbalagane@oracle.com>
Fri, 27 Jan 2012 01:21:19 +0000 (17:21 -0800)
commit19f4d8b71a9f2d9f3dc2b04397f89bb211d2145c
tree6f3d70a9537eec0441e5c7562ccdfb28fbc17345
parent3a2d360c4f36fa38e5e259f6f1cca10c18802ccd
Btrfs: fix reservations in btrfs_page_mkwrite

Josef fixed btrfs_page_mkwrite to properly release reserved
extents if there was an error.  But if we fail to get a reservation
and we fail to dirty the inode (for ENOSPC reasons), we'll end up
trying to release a reservation we never had.

This makes sure we only release if we were able to reserve.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c