]> git.karo-electronics.de Git - karo-tx-linux.git/commit
2.6.36's 7e496299d4d2 ("tmpfs: make tmpfs scalable with percpu_counter for
authorHugh Dickins <hughd@google.com>
Sat, 16 Jul 2011 13:30:42 +0000 (23:30 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Jul 2011 05:04:38 +0000 (15:04 +1000)
commit3c98f49cda5b5a6f1800ae0379fba2f1a42c4430
tree977587c8701b23eb3e8ccea9cb6de696fe24506e
parent5340c4e461936439555e51da845be881b48f3ed5
2.6.36's 7e496299d4d2 ("tmpfs: make tmpfs scalable with percpu_counter for
used blocks") to make tmpfs scalable with percpu_counter used
inode->i_lock in place of sbinfo->stat_lock around i_blocks updates; but
that was adverse to scalability, and unnecessary, since info->lock is
already held there in the fast paths.

Remove those uses of i_lock, and add info->lock in the three error paths
where it's then needed across shmem_free_blocks().  It's not actually
needed across shmem_unacct_blocks(), but they're so often paired that it
looks wrong to split them apart.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c