]> Pileus Git - ~andy/linux/commitdiff
vfs: atomic f_pos access in llseek()
authorEric Biggers <ebiggers3@gmail.com>
Sun, 16 Mar 2014 19:24:08 +0000 (14:24 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 23 Mar 2014 04:03:12 +0000 (00:03 -0400)
Commit 9c225f2655e36a4 ("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>
fs/read_write.c

index 54e19b9392dc74381fec154fe3f0ceab32ce9bd8..28cc9c810744a748d3a071b536c36547be87aa14 100644 (file)
@@ -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)
@@ -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