Michael Marineau 818db35992 tmpfs: fix mounts when size is less than the page size
When tmpfs is mounted with a size less than one page, the number of blocks
is set to 0 which makes the tmpfs mount unlimited.  This can lead to a
quick and surprising death if someone typos a tmpfs mount command and
writes too much.

tmpfs can still be mounted as unlimited if size or nr_blocks is exactly 0,
as Documentation/filesystems/tmpfs.txt says.

Hugh: do this by rounding size up instead of down in all cases: which
slightly expands other odd-sized tmpfs mounts, but in a consistent way.

Signed-off-by: Michael Marineau <mike@marineau.org>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:15 -08:00
..
2007-07-17 10:22:59 -07:00
2007-10-16 09:43:02 -07:00
2007-10-20 01:27:18 +02:00
2007-10-20 02:13:26 +02:00
2007-02-15 09:57:03 -08:00
2007-10-18 14:37:31 -07:00
2007-05-21 09:18:19 -07:00
2008-02-05 09:44:14 -08:00
2008-01-25 21:08:27 +01:00
2007-10-20 01:27:18 +02:00
2007-10-17 08:42:45 -07:00
2007-12-09 10:17:52 -08:00
2008-02-04 10:56:02 -08:00
2007-10-20 01:27:18 +02:00
2008-02-05 09:44:15 -08:00
2007-11-14 18:45:41 -08:00
2007-10-20 01:27:18 +02:00
2007-11-14 18:45:42 -08:00