tmpfs: fix off-by-one in max_blocks checks
commita1cae297f2bfede2268dee6ce994ef3d861db9ac
authorHugh Dickins <hughd@google.com>
Thu, 14 Apr 2011 22:22:07 +0000 (14 15:22 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 May 2011 22:13:24 +0000 (21 15:13 -0700)
tree9f1952c75ac210a0bbdaced4895427dbaca4d81e
parent3c249016aed25db602d4849c2690521cf5e1ff2f
tmpfs: fix off-by-one in max_blocks checks

commit fc5da22ae35d4720be59af8787a8a6d5e4da9517 upstream.

If you fill up a tmpfs, df was showing

  tmpfs                   460800         -         -   -  /tmp

because of an off-by-one in the max_blocks checks.  Fix it so df shows

  tmpfs                   460800    460800         0 100% /tmp

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/shmem.c