]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Convert to new freezing mechanism
authorJan Kara <jack@suse.cz>
Tue, 12 Jun 2012 14:20:45 +0000 (16:20 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 31 Jul 2012 05:45:52 +0000 (09:45 +0400)
commit075e36803a22eec52b5bb319c7d816989f34ca65
tree05bc5ec6d01f45307eed33082f9f1c288c907999
parent4418043176014e1dd0f6cf7de07444a778ce360b
btrfs: Convert to new freezing mechanism

We convert btrfs_file_aio_write() to use new freeze check.  We also add proper
freeze protection to btrfs_page_mkwrite(). We also add freeze protection to
the transaction mechanism to avoid starting transactions on frozen filesystem.
At minimum this is necessary to stop iput() of unlinked file to change frozen
filesystem during truncation.

Checks in cleaner_kthread() and transaction_kthread() can be safely removed
since btrfs_freeze() will lock the mutexes and thus block the threads (and they
shouldn't have anything to do anyway).

CC: linux-btrfs@vger.kernel.org
CC: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/btrfs/disk-io.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/transaction.c