From: Josef Bacik Date: Wed, 27 Jun 2012 21:18:41 +0000 (-0400) Subject: Btrfs: hold a ref on the inode during writepages X-Git-Tag: v3.5-rc6~14^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fd1a3f73f3743b4ffd520effe288a70b0ec47c9;p=pandora-kernel.git Btrfs: hold a ref on the inode during writepages We can race with unlink and not actually be able to do our igrab in btrfs_add_ordered_extent. This will result in all sorts of problems. Instead of doing the complicated work to try and handle returning an error properly from btrfs_add_ordered_extent, just hold a ref to the inode during writepages. If we cannot grab a ref we know we're freeing this inode anyway and can just drop the dirty pages on the floor, because screw them we're going to invalidate them anyway. Thanks, Signed-off-by: Josef Bacik --- Reading git-diff-tree failed