projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b48c6af
)
fuse: llseek fix race
author
Miklos Szeredi
<mszeredi@suse.cz>
Tue, 13 Dec 2011 10:40:59 +0000
(11:40 +0100)
committer
Miklos Szeredi
<mszeredi@suse.cz>
Tue, 13 Dec 2011 10:40:59 +0000
(11:40 +0100)
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>
fs/fuse/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/fuse/file.c
b/fs/fuse/file.c
index 19029e97ca2f2507a091c3c7fb8d3d043af30737..0c84100acd4492966e2fa48de6fbfacca0f10172 100644
(file)
--- a/
fs/fuse/file.c
+++ b/
fs/fuse/file.c
@@
-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: