]> git.hungrycats.org Git - linux/commitdiff
btrfs: fix state->private cast on 32 bit machines
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Thu, 25 Dec 2014 09:21:41 +0000 (18:21 +0900)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 23 Jan 2015 02:52:50 +0000 (21:52 -0500)
Suppress the following warning displayed on building 32bit (i686) kernel.

===============================================================================
...
   CC [M]  fs/btrfs/extent_io.o
fs/btrfs/extent_io.c: In function ‘btrfs_free_io_failure_record’:
fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
    failrec = (struct io_failure_record *)state->private;
...
===============================================================================

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Reported-by: Chris Murphy <chris@colorremedies.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit 6e1103a6e9b19dbdc348077d04a546b626911fc5)

fs/btrfs/extent_io.c

index e911ac0faa13790e4667699e5551ce23b9a979de..ea542fa781da639de523a8fe70e67250e8c0050d 100644 (file)
@@ -2182,7 +2182,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end)
 
                next = next_state(state);
 
-               failrec = (struct io_failure_record *)state->private;
+               failrec = (struct io_failure_record *)(unsigned long)state->private;
                free_extent_state(state);
                kfree(failrec);