mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
fuse: llseek fix race
Fix race between lseek(fd, 0, SEEK_CUR) and read/write. This was fixed in
generic code by commit 5b6f1eb97d
(vfs: lseek(fd, 0, SEEK_CUR) race condition).
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
parent
b48c6af208
commit
73104b6e37
@ -1567,6 +1567,10 @@ static loff_t fuse_file_llseek(struct file *file, loff_t offset, int origin)
|
||||
offset += i_size_read(inode);
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
if (offset == 0) {
|
||||
retval = file->f_pos;
|
||||
goto exit;
|
||||
}
|
||||
offset += file->f_pos;
|
||||
break;
|
||||
case SEEK_DATA:
|
||||
|
Loading…
Reference in New Issue
Block a user