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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index f5c67c59ec1..a305d9e2d1b 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -420,9 +420,9 @@ static inline void __file_sb_list_add(struct file *file, struct super_block *sb)
420 */ 420 */
421void file_sb_list_add(struct file *file, struct super_block *sb) 421void file_sb_list_add(struct file *file, struct super_block *sb)
422{ 422{
423 lg_local_lock(files_lglock); 423 lg_local_lock(&files_lglock);
424 __file_sb_list_add(file, sb); 424 __file_sb_list_add(file, sb);
425 lg_local_unlock(files_lglock); 425 lg_local_unlock(&files_lglock);
426} 426}
427 427
428/** 428/**
@@ -435,9 +435,9 @@ void file_sb_list_add(struct file *file, struct super_block *sb)
435void file_sb_list_del(struct file *file) 435void file_sb_list_del(struct file *file)
436{ 436{
437 if (!list_empty(&file->f_u.fu_list)) { 437 if (!list_empty(&file->f_u.fu_list)) {
438 lg_local_lock_cpu(files_lglock, file_list_cpu(file)); 438 lg_local_lock_cpu(&files_lglock, file_list_cpu(file));
439 list_del_init(&file->f_u.fu_list); 439 list_del_init(&file->f_u.fu_list);
440 lg_local_unlock_cpu(files_lglock, file_list_cpu(file)); 440 lg_local_unlock_cpu(&files_lglock, file_list_cpu(file));
441 } 441 }
442} 442}
443 443
@@ -484,7 +484,7 @@ void mark_files_ro(struct super_block *sb)
484 struct file *f; 484 struct file *f;
485 485
486retry: 486retry:
487 lg_global_lock(files_lglock); 487 lg_global_lock(&files_lglock);
488 do_file_list_for_each_entry(sb, f) { 488 do_file_list_for_each_entry(sb, f) {
489 struct vfsmount *mnt; 489 struct vfsmount *mnt;
490 if (!S_ISREG(f->f_path.dentry->d_inode->i_mode)) 490 if (!S_ISREG(f->f_path.dentry->d_inode->i_mode))
@@ -501,12 +501,12 @@ retry:
501 file_release_write(f); 501 file_release_write(f);
502 mnt = mntget(f->f_path.mnt); 502 mnt = mntget(f->f_path.mnt);
503 /* This can sleep, so we can't hold the spinlock. */ 503 /* This can sleep, so we can't hold the spinlock. */
504 lg_global_unlock(files_lglock); 504 lg_global_unlock(&files_lglock);
505 mnt_drop_write(mnt); 505 mnt_drop_write(mnt);
506 mntput(mnt); 506 mntput(mnt);
507 goto retry; 507 goto retry;
508 } while_file_list_for_each_entry; 508 } while_file_list_for_each_entry;
509 lg_global_unlock(files_lglock); 509 lg_global_unlock(&files_lglock);
510} 510}
511 511
512void __init files_init(unsigned long mempages) 512void __init files_init(unsigned long mempages)
@@ -524,6 +524,6 @@ void __init files_init(unsigned long mempages)
524 n = (mempages * (PAGE_SIZE / 1024)) / 10; 524 n = (mempages * (PAGE_SIZE / 1024)) / 10;
525 files_stat.max_files = max_t(unsigned long, n, NR_FILE); 525 files_stat.max_files = max_t(unsigned long, n, NR_FILE);
526 files_defer_init(); 526 files_defer_init();
527 lg_lock_init(files_lglock); 527 lg_lock_init(&files_lglock, "files_lglock");
528 percpu_counter_init(&nr_files, 0); 528 percpu_counter_init(&nr_files, 0);
529} 529}