Btrfs: fix reada debug code compilation
authorVincent <vincent.stehle@laposte.net>
Tue, 16 Apr 2013 08:15:25 +0000 (08:15 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:55 +0000 (15:54 -0400)
This fixes the following errors:

  fs/btrfs/reada.c: In function ‘btrfs_reada_wait’:
  fs/btrfs/reada.c:958:42: error: invalid operands to binary < (have ‘atomic_t’ and ‘int’)
  fs/btrfs/reada.c:961:41: error: invalid operands to binary < (have ‘atomic_t’ and ‘int’)

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/reada.c

index 96b93daa0bbb484440e5d51b605ea15884cb9148..1031b69252c5a235046e7732d378e14865e54b50 100644 (file)
@@ -955,10 +955,11 @@ int btrfs_reada_wait(void *handle)
        while (atomic_read(&rc->elems)) {
                wait_event_timeout(rc->wait, atomic_read(&rc->elems) == 0,
                                   5 * HZ);
-               dump_devs(rc->root->fs_info, rc->elems < 10 ? 1 : 0);
+               dump_devs(rc->root->fs_info,
+                         atomic_read(&rc->elems) < 10 ? 1 : 0);
        }
 
-       dump_devs(rc->root->fs_info, rc->elems < 10 ? 1 : 0);
+       dump_devs(rc->root->fs_info, atomic_read(&rc->elems) < 10 ? 1 : 0);
 
        kref_put(&rc->refcnt, reada_control_release);