]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: truncate on spontaneous size change
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 17 Oct 2007 06:31:01 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:03 +0000 (08:43 -0700)
commitd4995dce482c1d0f7b7397c5ca59477f99ae90bf
treec57228fae55fdb0b91fa6c211431a4ced2435c53
parentf670981623a588f9ba62b75884b7f8bf4c99616a
fuse: truncate on spontaneous size change

Memory mappings were only truncated on an explicit truncate, but not when the
file size was changed externally.

Fix this by moving the truncation code from fuse_setattr to
fuse_change_attributes.

Yes, there are races between write and and external truncation, but we can't
really do anything about them.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fuse/dir.c
fs/fuse/inode.c