tmpfs: fix off-by-one in max_blocks checks
authorHugh Dickins <hughd@google.com>
Thu, 14 Apr 2011 22:22:07 +0000 (15:22 -0700)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:27 +0000 (14:23 -0500)
commit8becce8820aa6b766ff7a9ea168cccbead64fe21
tree7bd305942981f1527dee68a30819b3dace5b9e45
parentd9574e86a28741b417d0f6b8210a8e5c8b699738
tmpfs: fix off-by-one in max_blocks checks

BugLink: http://bugs.launchpad.net/bugs/788691

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>
Signed-off-by: Steve Conklin <sconklin@canonical.com>
mm/shmem.c