aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorFelix Blyakher <felixb@sgi.com>2009-03-30 23:08:33 -0400
committerFelix Blyakher <felixb@sgi.com>2009-03-30 23:08:33 -0400
commit930861c4e6f13ce2e7d06cd1ef11441a065517d9 (patch)
treedf6ff01f89768ff8d6fe6a64491be30e6e56c3e0 /fs/super.c
parent8b112171734c791afaf43ccc8c6ec492e7006e44 (diff)
parent15f7176eb1cccec0a332541285ee752b935c1c85 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/fs/super.c b/fs/super.c
index 6ce501447ada..2ba481518ba7 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -197,7 +197,7 @@ void deactivate_super(struct super_block *s)
197 if (atomic_dec_and_lock(&s->s_active, &sb_lock)) { 197 if (atomic_dec_and_lock(&s->s_active, &sb_lock)) {
198 s->s_count -= S_BIAS-1; 198 s->s_count -= S_BIAS-1;
199 spin_unlock(&sb_lock); 199 spin_unlock(&sb_lock);
200 DQUOT_OFF(s, 0); 200 vfs_dq_off(s, 0);
201 down_write(&s->s_umount); 201 down_write(&s->s_umount);
202 fs->kill_sb(s); 202 fs->kill_sb(s);
203 put_filesystem(fs); 203 put_filesystem(fs);
@@ -266,7 +266,7 @@ EXPORT_SYMBOL(unlock_super);
266void __fsync_super(struct super_block *sb) 266void __fsync_super(struct super_block *sb)
267{ 267{
268 sync_inodes_sb(sb, 0); 268 sync_inodes_sb(sb, 0);
269 DQUOT_SYNC(sb); 269 vfs_dq_sync(sb);
270 lock_super(sb); 270 lock_super(sb);
271 if (sb->s_dirt && sb->s_op->write_super) 271 if (sb->s_dirt && sb->s_op->write_super)
272 sb->s_op->write_super(sb); 272 sb->s_op->write_super(sb);
@@ -655,7 +655,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
655 mark_files_ro(sb); 655 mark_files_ro(sb);
656 else if (!fs_may_remount_ro(sb)) 656 else if (!fs_may_remount_ro(sb))
657 return -EBUSY; 657 return -EBUSY;
658 retval = DQUOT_OFF(sb, 1); 658 retval = vfs_dq_off(sb, 1);
659 if (retval < 0 && retval != -ENOSYS) 659 if (retval < 0 && retval != -ENOSYS)
660 return -EBUSY; 660 return -EBUSY;
661 } 661 }
@@ -670,11 +670,11 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
670 } 670 }
671 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK); 671 sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) | (flags & MS_RMT_MASK);
672 if (remount_rw) 672 if (remount_rw)
673 DQUOT_ON_REMOUNT(sb); 673 vfs_dq_quota_on_remount(sb);
674 return 0; 674 return 0;
675} 675}
676 676
677static void do_emergency_remount(unsigned long foo) 677static void do_emergency_remount(struct work_struct *work)
678{ 678{
679 struct super_block *sb; 679 struct super_block *sb;
680 680
@@ -697,12 +697,19 @@ static void do_emergency_remount(unsigned long foo)
697 spin_lock(&sb_lock); 697 spin_lock(&sb_lock);
698 } 698 }
699 spin_unlock(&sb_lock); 699 spin_unlock(&sb_lock);
700 kfree(work);
700 printk("Emergency Remount complete\n"); 701 printk("Emergency Remount complete\n");
701} 702}
702 703
703void emergency_remount(void) 704void emergency_remount(void)
704{ 705{
705 pdflush_operation(do_emergency_remount, 0); 706 struct work_struct *work;
707
708 work = kmalloc(sizeof(*work), GFP_ATOMIC);
709 if (work) {
710 INIT_WORK(work, do_emergency_remount);
711 schedule_work(work);
712 }
706} 713}
707 714
708/* 715/*
@@ -831,7 +838,8 @@ int get_sb_bdev(struct file_system_type *fs_type,
831 bdev->bd_super = s; 838 bdev->bd_super = s;
832 } 839 }
833 840
834 return simple_set_mnt(mnt, s); 841 simple_set_mnt(mnt, s);
842 return 0;
835 843
836error_s: 844error_s:
837 error = PTR_ERR(s); 845 error = PTR_ERR(s);
@@ -877,7 +885,8 @@ int get_sb_nodev(struct file_system_type *fs_type,
877 return error; 885 return error;
878 } 886 }
879 s->s_flags |= MS_ACTIVE; 887 s->s_flags |= MS_ACTIVE;
880 return simple_set_mnt(mnt, s); 888 simple_set_mnt(mnt, s);
889 return 0;
881} 890}
882 891
883EXPORT_SYMBOL(get_sb_nodev); 892EXPORT_SYMBOL(get_sb_nodev);
@@ -909,7 +918,8 @@ int get_sb_single(struct file_system_type *fs_type,
909 s->s_flags |= MS_ACTIVE; 918 s->s_flags |= MS_ACTIVE;
910 } 919 }
911 do_remount_sb(s, flags, data, 0); 920 do_remount_sb(s, flags, data, 0);
912 return simple_set_mnt(mnt, s); 921 simple_set_mnt(mnt, s);
922 return 0;
913} 923}
914 924
915EXPORT_SYMBOL(get_sb_single); 925EXPORT_SYMBOL(get_sb_single);