Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262572
b: refs/heads/master
c: 1117f72
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 6, 2011
1 parent 7f95f65 commit 2a1f80e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c21427043dec93d40e3a1af970831d1f5f15ce5d
refs/heads/master: 1117f72ea0217ba0cc19f05adbbd8b9a397f5ab7
10 changes: 9 additions & 1 deletion trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,14 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
spin_lock(&files->file_lock);
file = fcheck_files(files, fd);
if (file) {
unsigned int f_flags;
struct fdtable *fdt;

fdt = files_fdtable(files);
f_flags = file->f_flags & ~O_CLOEXEC;
if (FD_ISSET(fd, fdt->close_on_exec))
f_flags |= O_CLOEXEC;

if (path) {
*path = file->f_path;
path_get(&file->f_path);
Expand All @@ -1928,7 +1936,7 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
"pos:\t%lli\n"
"flags:\t0%o\n",
(long long) file->f_pos,
file->f_flags);
f_flags);
spin_unlock(&files->file_lock);
put_files_struct(files);
return 0;
Expand Down

0 comments on commit 2a1f80e

Please sign in to comment.