]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: update file size on short read
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 30 Apr 2008 07:54:43 +0000 (00:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:50 +0000 (08:29 -0700)
commitca609249431c394f2e79ac7f6124e021c07196e8
tree4f78209ad05e429a0b89658e495fca9b9262d81d
parentdc23c1d1c54ed7703a30710367ec565c32e31a14
fuse: update file size on short read

If the READ request returned a short count, then either

  - cached size is incorrect
  - filesystem is buggy, as short reads are only allowed on EOF

So assume that the size is wrong and refresh it, so that cached read() doesn't
zero fill the missing chunk.

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/file.c
fs/fuse/fuse_i.h