linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* New sparse warning on setting s_maxbytes?
@ 2012-10-03 19:07 Steve French
  2012-10-03 19:49 ` Jeff Layton
  0 siblings, 1 reply; 4+ messages in thread
From: Steve French @ 2012-10-03 19:07 UTC (permalink / raw)
  To: linux-fsdevel

I noticed this new sparse warning on setting s_maxbytes
fs/cifs/cifsfs.c:109:34: warning: constant 0x7fffffffffffffff is so
big it is long

e.g. cifsfs.c, as do various other file systems, has

            sb->s_maxbytes = MAX_LFS_FILESIZE;

fs.h defines it:

/* Page cache limit. The filesystems should put that into their s_maxbytes
   limits, otherwise bad things can happen in VM. */
#if BITS_PER_LONG==32
#define MAX_LFS_FILESIZE	(((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
#elif BITS_PER_LONG==64
#define MAX_LFS_FILESIZE 	((loff_t)0x7fffffffffffffff)
#endif

It looks like recent commit 2bd2c1941f141ad780135ccc1cd08ca71a24f10a
("MAX_LFS_FILESIZE should be a loff_t") causes the warning.  Removes
one warning but causes another.

-- 
Thanks,

Steve

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

end of thread, other threads:[~2012-10-03 20:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 19:07 New sparse warning on setting s_maxbytes? Steve French
2012-10-03 19:49 ` Jeff Layton
2012-10-03 19:52   ` Al Viro
2012-10-03 20:08     ` Steve French

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).