[PATCH][RT] btrfs compile fix

From: Sven-Thorsten Dietrich
Date: Thu Aug 13 2009 - 00:45:40 EST


Subject: add back in btrfs commit_root_sem.
From: rt-2.6.31-rc4-rt1

Seems to be in flux, but these are required for the status-quo to compile.

Not run-time tested.

Signed-off-by: Sven-Thorsten Dietrich <sdietrich@xxxxxxx>
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -942,6 +959,9 @@ struct btrfs_root {
/* the node lock is held while changing the node pointer */
spinlock_t node_lock;

+ /* taken when updating the commit root */
+ struct rw_semaphore commit_root_sem;
+
struct extent_buffer *commit_root;
struct btrfs_root *log_root;
struct btrfs_root *reloc_root;
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -909,6 +909,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
spin_lock_init(&root->inode_lock);
mutex_init(&root->objectid_mutex);
mutex_init(&root->log_mutex);
+ init_rwsem(&root->commit_root_sem);
init_waitqueue_head(&root->log_writer_wait);
init_waitqueue_head(&root->log_commit_wait[0]);
init_waitqueue_head(&root->log_commit_wait[1]);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/