shmem: factor out sbi->free_inodes manipulations
authorPavel Emelyanov <xemul@openvz.org>
Tue, 5 Feb 2008 06:28:47 +0000 (22:28 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 5 Feb 2008 17:44:15 +0000 (09:44 -0800)
commit5b04c6890f0dc7ea6c85b9adebc883c55c667d97
tree50f060de1edcd5cda14290f13bad0e74433b0a67
parent2e441889c38fe1b6ef6b963e6993076aa120176c
shmem: factor out sbi->free_inodes manipulations

The shmem_sb_info structure has a number of free_inodes. This
value is altered in appropriate places under spinlock and with
the sbi->max_inodes != 0 check.

Consolidate these manipulations into two helpers.

This is minus 42 bytes of shmem.o and minus 4 :) lines of code.

[akpm@linux-foundation.org: fix error return values]
Signed-off-by: Pavel Emelyanov <xemul@openvz.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>
mm/shmem.c