]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/fs.h
mm: rcu-protected get_mm_exe_file()
[karo-tx-linux.git] / include / linux / fs.h
index f4fc60727b8da5a1c0e5e0dc1085013949a8c2d8..6bf7ab7c15737675a9f814cc305c90c96ac056ca 100644 (file)
@@ -870,6 +870,7 @@ static inline struct file *get_file(struct file *f)
        atomic_long_inc(&f->f_count);
        return f;
 }
+#define get_file_rcu(x) atomic_long_inc_not_zero(&(x)->f_count)
 #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1)
 #define file_count(x)  atomic_long_read(&(x)->f_count)