btrfs: list_entry can't return NULL
authorEric Sandeen <sandeen@redhat.com>
Thu, 31 Jan 2013 00:54:53 +0000 (00:54 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:15 +0000 (12:59 -0500)
No need to test the result, we can't get a
null pointer from list_entry()

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c

index 8e58a1f9054697fdf6a4866e4fb738afc97e9a98..bd48bf21118ec80263a9bebf81cabd19a66d204e 100644 (file)
@@ -3846,8 +3846,6 @@ int btrfs_cleanup_transaction(struct btrfs_root *root)
 
        while (!list_empty(&list)) {
                t = list_entry(list.next, struct btrfs_transaction, list);
-               if (!t)
-                       break;
 
                btrfs_destroy_ordered_operations(root);