Btrfs: take i_mutex before generic_write_checks
authorChris Mason <chris.mason@oracle.com>
Thu, 1 Oct 2009 16:29:10 +0000 (12:29 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 1 Oct 2009 16:29:10 +0000 (12:29 -0400)
btrfs_file_write was incorrectly calling generic_write_checks without
taking i_mutex.  This lead to problems with racing around i_size when
doing O_APPEND writes.

The fix here is to move i_mutex higher.

Signed-off-by: Chris Mason <chris.mason@oracle.com>

No differences found