linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/ext4/extents_status.c: fix 64-bit number truncation bug
@ 2014-03-31 13:16 Chen Gang
  2014-04-04  9:18 ` Chen Gang
  2014-04-06 13:39 ` Geert Uytterhoeven
  0 siblings, 2 replies; 6+ messages in thread
From: Chen Gang @ 2014-03-31 13:16 UTC (permalink / raw)
  To: tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel@vger.kernel.org, gxt

'0x7FDEADBEEF' will be truncated to 32-bit number under unicore32. Need
append 'ULL' for it.

The related warning (with allmodconfig under unicore32):

    CC [M]  fs/ext4/extents_status.o
  fs/ext4/extents_status.c: In function ‘__es_remove_extent’:
  fs/ext4/extents_status.c:813: warning: integer constant is too large for ‘long’ type


Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 fs/ext4/extents_status.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 0a014a7..0ebc212 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -810,7 +810,7 @@ retry:
 
 			newes.es_lblk = end + 1;
 			newes.es_len = len2;
-			block = 0x7FDEADBEEF;
+			block = 0x7FDEADBEEFULL;
 			if (ext4_es_is_written(&orig_es) ||
 			    ext4_es_is_unwritten(&orig_es))
 				block = ext4_es_pblock(&orig_es) +
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-07  5:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31 13:16 [PATCH] fs/ext4/extents_status.c: fix 64-bit number truncation bug Chen Gang
2014-04-04  9:18 ` Chen Gang
2014-04-06 13:39 ` Geert Uytterhoeven
2014-04-06 23:58   ` Chen Gang
2014-04-07  4:14   ` Theodore Ts'o
2014-04-07  5:00     ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).