diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2008-10-16 16:08:56 +0200 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2008-10-16 16:08:56 +0200 |
commit | 769415c61191bc860f60c6edc3cb7cba24fb3218 (patch) | |
tree | c9ca5eb8afd1e4848967c3ec5a0a97dcda395e3f /fs/fuse/file.c | |
parent | 04ab591808565f968d4406f6435090ad671ebdab (diff) | |
download | linux-769415c61191bc860f60c6edc3cb7cba24fb3218.tar.gz linux-769415c61191bc860f60c6edc3cb7cba24fb3218.tar.bz2 linux-769415c61191bc860f60c6edc3cb7cba24fb3218.zip |
fuse: fix SEEK_END incorrectness
Update file size before using it in lseek(..., SEEK_END).
Reported-by: Amnon Shiloh <u3557@miso.sublimeip.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r-- | fs/fuse/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 2bada6bbc317..98079aa800e8 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1448,6 +1448,9 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin) mutex_lock(&inode->i_mutex); switch (origin) { case SEEK_END: + retval = fuse_update_attributes(inode, NULL, file, NULL); + if (retval) + return retval; offset += i_size_read(inode); break; case SEEK_CUR: |