]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/inode-map.c
Merge branch 'ttm-fixes-3.13' of git://people.freedesktop.org/~thomash/linux into...
[karo-tx-linux.git] / fs / btrfs / inode-map.c
index 014de497e8884528f40b1536db403d442a017a60..ab485e57b6fe6c7ea14f580976dd46c7efd88ffb 100644 (file)
@@ -78,10 +78,8 @@ again:
                            btrfs_transaction_in_commit(fs_info)) {
                                leaf = path->nodes[0];
 
-                               if (btrfs_header_nritems(leaf) == 0) {
-                                       WARN_ON(1);
+                               if (WARN_ON(btrfs_header_nritems(leaf) == 0))
                                        break;
-                               }
 
                                /*
                                 * Save the key so we can advances forward
@@ -237,7 +235,7 @@ again:
                start_caching(root);
 
                if (objectid <= root->cache_progress ||
-                   objectid > root->highest_objectid)
+                   objectid >= root->highest_objectid)
                        __btrfs_add_free_space(ctl, objectid, 1);
                else
                        __btrfs_add_free_space(pinned, objectid, 1);