From: Oleg Nesterov Date: Sat, 11 Jan 2014 18:19:53 +0000 (+0100) Subject: change close_files() to use rcu_dereference_raw(files->fdt) X-Git-Tag: v3.14-rc1~78^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce08b62d18b3f97cd4e5a39bd5898872b9201875;p=pandora-kernel.git 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 Signed-off-by: Al Viro --- Reading git-diff-tree failed