]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: allow O_PATH file descriptors for fstatfs()
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 30 Sep 2013 15:35:10 +0000 (08:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 12 Oct 2013 20:12:31 +0000 (13:12 -0700)
commit11a6b5415982c81fbb305c8e288e2530a844e44b
tree34338d6fa3c2998692940da9db3ed7884cda74f3
parentb98a7a1c7b1d65c7418059c0e1b5e2b054376e97
vfs: allow O_PATH file descriptors for fstatfs()

Olga reported that file descriptors opened with O_PATH do not work with
fstatfs(), found during further development of ksh93's thread support.

There is no reason to not allow O_PATH file descriptors here (fstatfs is
very much a path operation), so use "fdget_raw()".  See commit
b65dcbf680de ("vfs: make O_PATH file descriptors usable for 'fstat()'")
for a very similar issue reported for fstat() by the same team.

Reported-and-tested-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org # O_PATH introduced in 3.0+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/statfs.c