summaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2014-01-11 19:19:53 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2014-01-25 03:14:37 -0500
commitce08b62d18b3f97cd4e5a39bd5898872b9201875 (patch)
treec5fc6f39a15131e28954cdb7fea7f8e181bc5eee /fs/compat.c
parenta8d4b8345e0ee48b732126d980efaf0dc373e2b0 (diff)
downloadlinux-ce08b62d18b3f97cd4e5a39bd5898872b9201875.tar.bz2
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 <oleg@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
0 files changed, 0 insertions, 0 deletions