projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04ab591
)
fuse: fix SEEK_END incorrectness
author
Miklos Szeredi
<mszeredi@suse.cz>
Thu, 16 Oct 2008 14:08:56 +0000
(16:08 +0200)
committer
Miklos Szeredi
<miklos@szeredi.hu>
Thu, 16 Oct 2008 14:08:56 +0000
(16:08 +0200)
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>
fs/fuse/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/fuse/file.c
b/fs/fuse/file.c
index 2bada6bbc317dbeab3887fbcd26ed9fe630b6148..98079aa800e88b595a7cfca58abc878e9dcab1b6 100644
(file)
--- 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: