aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/root-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-01-05 21:25:51 -0500
committerChris Mason <chris.mason@oracle.com>2009-01-05 21:25:51 -0500
commitd397712bcc6a759a560fd247e6053ecae091f958 (patch)
tree9da8daebb870d8b8b1843507c4621715e23dd31a /fs/btrfs/root-tree.c
parent1f3c79a28c8837e8572b98f6d14142d9a6133c56 (diff)
Btrfs: Fix checkpatch.pl warnings
There were many, most are fixed now. struct-funcs.c generates some warnings but these are bogus. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r--fs/btrfs/root-tree.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index f99335a999d6..b48650de4472 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -132,8 +132,9 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
132 132
133 if (ret != 0) { 133 if (ret != 0) {
134 btrfs_print_leaf(root, path->nodes[0]); 134 btrfs_print_leaf(root, path->nodes[0]);
135 printk("unable to update root key %Lu %u %Lu\n", 135 printk(KERN_CRIT "unable to update root key %llu %u %llu\n",
136 key->objectid, key->type, key->offset); 136 (unsigned long long)key->objectid, key->type,
137 (unsigned long long)key->offset);
137 BUG_ON(1); 138 BUG_ON(1);
138 } 139 }
139 140
@@ -159,9 +160,9 @@ int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root
159 160
160/* 161/*
161 * at mount time we want to find all the old transaction snapshots that were in 162 * at mount time we want to find all the old transaction snapshots that were in
162 * the process of being deleted if we crashed. This is any root item with an offset 163 * the process of being deleted if we crashed. This is any root item with an
163 * lower than the latest root. They need to be queued for deletion to finish 164 * offset lower than the latest root. They need to be queued for deletion to
164 * what was happening when we crashed. 165 * finish what was happening when we crashed.
165 */ 166 */
166int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid, 167int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid,
167 struct btrfs_root *latest) 168 struct btrfs_root *latest)
@@ -188,7 +189,7 @@ again:
188 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); 189 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
189 if (ret < 0) 190 if (ret < 0)
190 goto err; 191 goto err;
191 while(1) { 192 while (1) {
192 leaf = path->nodes[0]; 193 leaf = path->nodes[0];
193 nritems = btrfs_header_nritems(leaf); 194 nritems = btrfs_header_nritems(leaf);
194 slot = path->slots[0]; 195 slot = path->slots[0];
@@ -258,11 +259,7 @@ int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
258 ret = btrfs_search_slot(trans, root, key, path, -1, 1); 259 ret = btrfs_search_slot(trans, root, key, path, -1, 1);
259 if (ret < 0) 260 if (ret < 0)
260 goto out; 261 goto out;
261 if (ret) {
262btrfs_print_leaf(root, path->nodes[0]);
263printk("failed to del %Lu %u %Lu\n", key->objectid, key->type, key->offset);
264 262
265 }
266 BUG_ON(ret != 0); 263 BUG_ON(ret != 0);
267 leaf = path->nodes[0]; 264 leaf = path->nodes[0];
268 ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item); 265 ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item);