提交 769415c6 编写于 作者: M Miklos Szeredi 提交者: Miklos Szeredi

fuse: fix SEEK_END incorrectness

Update file size before using it in lseek(..., SEEK_END).
Reported-by: NAmnon Shiloh <u3557@miso.sublimeip.com>
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
上级 04ab5918
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册