]> git.baikalelectronics.ru Git - kernel.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)
committerChris Mason <chris.mason@oracle.com>
Fri, 27 Jan 2012 15:44:44 +0000 (10:44 -0500)
commitd3c792c9706677b5b57d346dbdd852ab049f1614
tree5d01f0e7efae049b9be80292c93fe30f11eeefd1
parente4cbc781657eb04a317c674e8fe6ce3976d7e282
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