Skip to content

Commit

Permalink
vfs: atomic f_pos access in llseek()
Browse files Browse the repository at this point in the history
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 <ebiggers3@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Eric Biggers authored and Al Viro committed Mar 23, 2014
1 parent 774868c commit d7a15f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
unsigned int, whence)
{
int retval;
struct fd f = fdget(fd);
struct fd f = fdget_pos(fd);
loff_t offset;

if (!f.file)
Expand All @@ -327,7 +327,7 @@ SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high,
retval = 0;
}
out_putf:
fdput(f);
fdput_pos(f);
return retval;
}
#endif
Expand Down

0 comments on commit d7a15f8

Please sign in to comment.