]> git.neil.brown.name Git - history.git/commit
[PATCH] shmem: remove info->sem
authorHugh Dickins <hugh@veritas.com>
Thu, 3 Oct 2002 06:00:32 +0000 (23:00 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 3 Oct 2002 06:00:32 +0000 (23:00 -0700)
commitcd7fef3d792cb28eacc97f318937e50abb1cd8d0
tree5f8444951eeb8124bfa9fe86d89e559ce5ed0869
parent91abc449e0ffdb1c7aab6de049efc70ce9aaeb1d
[PATCH] shmem: remove info->sem

Between inode->i_sem and info->lock comes info->sem; but it doesn't
guard thoroughly against the difficult races (truncate during read),
and serializes reads from tmpfs unlike other filesystems.  I'd prefer
to work with just i_sem and info->lock, backtracking when necessary
(when another task allocates block or metablock at the same time).

(I am not satisfied with the locked setting of next_index at the start
of shmem_getpage_locked: it's one lock hold too many, and it doesn't
really fix races against truncate better than before: another patch in
a later batch will resolve that.)
include/linux/shmem_fs.h
mm/shmem.c