diff options
| author | Oleg Nesterov <[email protected]> | 2014-01-11 19:19:53 +0100 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2014-01-25 03:14:37 -0500 |
| commit | ce08b62d18b3f97cd4e5a39bd5898872b9201875 (patch) | |
| tree | c5fc6f39a15131e28954cdb7fea7f8e181bc5eee /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | a8d4b8345e0ee48b732126d980efaf0dc373e2b0 (diff) | |
change close_files() to use rcu_dereference_raw(files->fdt)
put_files_struct() and close_files() do rcu_read_lock() to make
rcu_dereference_check_fdtable() happy.
This looks a bit ugly, files_fdtable() just reads the pointer,
we can simply use rcu_dereference_raw() to avoid the warning.
The patch also changes close_files() to return fdt, this avoids
another rcu_read_lock()/files_fdtable() in put_files_struct().
I think close_files() needs more cleanups:
- we do not need xchg() exactly because we are the last
user of this files_struct
- "if (file)" should be turned into WARN_ON(!file)
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions