summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers3@gmail.com>2014-03-16 15:47:48 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-03-23 00:03:12 -0400
commit99aea68134f3c2a27b4d463c91cfa298c3efaccf (patch)
tree6b57fe890caaa2ff026a9d54a42f9ac95b96fee9 /fs/dcache.c
parentd7a15f8d0777955986a2ab00ab181795cab14b01 (diff)
vfs: Don't let __fdget_pos() get FMODE_PATH files
Commit bd2a31d522344 ("get rid of fget_light()") introduced the __fdget_pos() function, which returns the resulting file pointer and fdput flags combined in an 'unsigned long'. However, it also changed the behavior to return files with FMODE_PATH set, which shouldn't happen because read(), write(), lseek(), etc. aren't allowed on such files. This commit restores the old behavior. This regression actually had no effect on read() and write() since FMODE_READ and FMODE_WRITE are not set on file descriptors opened with O_PATH, but it did cause lseek() on a file descriptor opened with O_PATH to fail with ESPIPE rather than EBADF. Signed-off-by: Eric Biggers <ebiggers3@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions