aboutsummaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 86ec8ae985b4..4dc205546547 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -56,13 +56,13 @@ void filp_dtor(void * objp, struct kmem_cache_s *cachep, unsigned long dflags)
56 56
57static inline void file_free_rcu(struct rcu_head *head) 57static inline void file_free_rcu(struct rcu_head *head)
58{ 58{
59 struct file *f = container_of(head, struct file, f_rcuhead); 59 struct file *f = container_of(head, struct file, f_u.fu_rcuhead);
60 kmem_cache_free(filp_cachep, f); 60 kmem_cache_free(filp_cachep, f);
61} 61}
62 62
63static inline void file_free(struct file *f) 63static inline void file_free(struct file *f)
64{ 64{
65 call_rcu(&f->f_rcuhead, file_free_rcu); 65 call_rcu(&f->f_u.fu_rcuhead, file_free_rcu);
66} 66}
67 67
68/* Find an unused file structure and return a pointer to it. 68/* Find an unused file structure and return a pointer to it.
@@ -95,7 +95,7 @@ struct file *get_empty_filp(void)
95 f->f_gid = current->fsgid; 95 f->f_gid = current->fsgid;
96 rwlock_init(&f->f_owner.lock); 96 rwlock_init(&f->f_owner.lock);
97 /* f->f_version: 0 */ 97 /* f->f_version: 0 */
98 INIT_LIST_HEAD(&f->f_list); 98 INIT_LIST_HEAD(&f->f_u.fu_list);
99 return f; 99 return f;
100 100
101over: 101over:
@@ -225,15 +225,15 @@ void file_move(struct file *file, struct list_head *list)
225 if (!list) 225 if (!list)
226 return; 226 return;
227 file_list_lock(); 227 file_list_lock();
228 list_move(&file->f_list, list); 228 list_move(&file->f_u.fu_list, list);
229 file_list_unlock(); 229 file_list_unlock();
230} 230}
231 231
232void file_kill(struct file *file) 232void file_kill(struct file *file)
233{ 233{
234 if (!list_empty(&file->f_list)) { 234 if (!list_empty(&file->f_u.fu_list)) {
235 file_list_lock(); 235 file_list_lock();
236 list_del_init(&file->f_list); 236 list_del_init(&file->f_u.fu_list);
237 file_list_unlock(); 237 file_list_unlock();
238 } 238 }
239} 239}
@@ -245,7 +245,7 @@ int fs_may_remount_ro(struct super_block *sb)
245 /* Check that no files are currently opened for writing. */ 245 /* Check that no files are currently opened for writing. */
246 file_list_lock(); 246 file_list_lock();
247 list_for_each(p, &sb->s_files) { 247 list_for_each(p, &sb->s_files) {
248 struct file *file = list_entry(p, struct file, f_list); 248 struct file *file = list_entry(p, struct file, f_u.fu_list);
249 struct inode *inode = file->f_dentry->d_inode; 249 struct inode *inode = file->f_dentry->d_inode;
250 250
251 /* File with pending delete? */ 251 /* File with pending delete? */