From: Satoru Takeuchi Date: Thu, 25 Dec 2014 09:21:41 +0000 (+0900) Subject: btrfs: fix state->private cast on 32 bit machines X-Git-Tag: v3.18.51~10 X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adef520a920ebcb81df7d1a05014a933034aa9ea;p=linux btrfs: fix state->private cast on 32 bit machines commit 6e1103a6e9b19dbdc348077d04a546b626911fc5 upstream. 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 Reported-by: Chris Murphy Signed-off-by: Chris Mason Cc: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index cb239ddae5c90..b1131c319897a 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2163,7 +2163,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);