diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-01-07 21:58:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 21:58:02 -0800 |
commit | b37e39b03bcd49397cac7b937d9b180157705e08 (patch) | |
tree | bff70e85ba5286bb0c150b260eb1ace00242a6da /fs | |
parent | de146a08f93f5c4ab71503a79a7c5e300065b39a (diff) | |
download | history-b37e39b03bcd49397cac7b937d9b180157705e08.tar.gz |
[PATCH] vmtrunc: truncate_count not atomic
Why is mapping->truncate_count atomic? It's incremented inside i_mmap_lock
(and i_sem), and the reads don't need it to be atomic.
And why smp_rmb() before call to ->nopage? The compiler cannot reorder the
initial assignment of sequence after the call to ->nopage, and no cpu (yet!)
can read from the future, which is all that matters there.
And delete totally bogus reset of truncate_count from blkmtd add_device.
truncate_count is all about detecting i_size changes: i_size does not change
there; and if it did, the count should be incremented not reset.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/inode.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c index b6066773ad8210..0beebc00a6453f 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -198,7 +198,6 @@ void inode_init_once(struct inode *inode) INIT_RADIX_TREE(&inode->i_data.page_tree, GFP_ATOMIC); spin_lock_init(&inode->i_data.tree_lock); spin_lock_init(&inode->i_data.i_mmap_lock); - atomic_set(&inode->i_data.truncate_count, 0); INIT_LIST_HEAD(&inode->i_data.private_list); spin_lock_init(&inode->i_data.private_lock); INIT_RAW_PRIO_TREE_ROOT(&inode->i_data.i_mmap); |