summaryrefslogtreecommitdiff
path: root/drivers/misc/bh1770glc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-06 11:51:33 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-11 09:36:30 -0800
commit4f0bf01fabfa6519f8d96b089e44eeaf6cc085c2 (patch)
tree87007bc54e7116df14e02f749a6f1321b83c8f7d /drivers/misc/bh1770glc.c
parentbfcf6092c5b8789a179e40992ca041bbdbb859cc (diff)
vfs: show O_CLOEXE bit properly in /proc/<pid>/fdinfo/<fd> files
commit 1117f72ea0217ba0cc19f05adbbd8b9a397f5ab7 upstream. The CLOEXE bit is magical, and for performance (and semantic) reasons we don't actually maintain it in the file descriptor itself, but in a separate bit array. Which means that when we show f_flags, the CLOEXE status is shown incorrectly: we show the status not as it is now, but as it was when the file was opened. Fix that by looking up the bit properly in the 'fdt->close_on_exec' bit array. Uli needs this in order to re-implement the pfiles program: "For normal file descriptors (not sockets) this was the last piece of information which wasn't available. This is all part of my 'give Solaris users no reason to not switch' effort. I intend to offer the code to the util-linux-ng maintainers." Requested-by: Ulrich Drepper <drepper@akkadia.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/misc/bh1770glc.c')
0 files changed, 0 insertions, 0 deletions