Skip to content

Commit d7a15f8

Browse files
ebiggersAl Viro
authored andcommitted
vfs: atomic f_pos access in llseek()
Commit 9c225f2 ("vfs: atomic f_pos accesses as per POSIX") changed several system calls to use fdget_pos() instead of fdget(), but missed sys_llseek(). Fix it. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 774868c commit d7a15f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/read_write.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
307307
unsigned int, whence)
308308
{
309309
int retval;
310-
struct fd f = fdget(fd);
310+
struct fd f = fdget_pos(fd);
311311
loff_t offset;
312312

313313
if (!f.file)
@@ -327,7 +327,7 @@ SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
327327
retval = 0;
328328
}
329329
out_putf:
330-
fdput(f);
330+
fdput_pos(f);
331331
return retval;
332332
}
333333
#endif

0 commit comments

Comments
 (0)