summaryrefslogtreecommitdiff
path: root/include/linux/shmem_fs.h
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2002-10-02 23:00:32 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-02 23:00:32 -0700
commitcd7fef3d792cb28eacc97f318937e50abb1cd8d0 (patch)
tree5f8444951eeb8124bfa9fe86d89e559ce5ed0869 /include/linux/shmem_fs.h
parent91abc449e0ffdb1c7aab6de049efc70ce9aaeb1d (diff)
[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.)
Diffstat (limited to 'include/linux/shmem_fs.h')
-rw-r--r--include/linux/shmem_fs.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 9d39c403c0a0..81c150bb8081 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -11,7 +11,6 @@ extern atomic_t shmem_nrpages;
struct shmem_inode_info {
spinlock_t lock;
- struct semaphore sem;
unsigned long next_index;
swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */
void **i_indirect; /* indirect blocks */