Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: quota: Convert quota statistics to generic percpu_counter ext3 uses rb_node = NULL; to zero rb_root. quota: Fixup dquot_transfer reiserfs: Fix resuming of quotas on remount read-write pohmelfs: Remove dead quota code ufs: Remove dead quota code udf: Remove dead quota code quota: rename default quotactl methods to dquot_ quota: explicitly set ->dq_op and ->s_qcop quota: drop remount argument to ->quota_on and ->quota_off quota: move unmount handling into the filesystem quota: kill the vfs_dq_off and vfs_dq_quota_on_remount wrappers quota: move remount handling into the filesystem ocfs2: Fix use after free on remount read-only Fix up conflicts in fs/ext4/super.c and fs/ufs/file.c
This commit is contained in:
@@ -119,6 +119,8 @@ static void ext2_put_super (struct super_block * sb)
|
||||
int i;
|
||||
struct ext2_sb_info *sbi = EXT2_SB(sb);
|
||||
|
||||
dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
|
||||
|
||||
if (sb->s_dirt)
|
||||
ext2_write_super(sb);
|
||||
|
||||
@@ -1063,6 +1065,12 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
|
||||
sb->s_op = &ext2_sops;
|
||||
sb->s_export_op = &ext2_export_ops;
|
||||
sb->s_xattr = ext2_xattr_handlers;
|
||||
|
||||
#ifdef CONFIG_QUOTA
|
||||
sb->dq_op = &dquot_operations;
|
||||
sb->s_qcop = &dquot_quotactl_ops;
|
||||
#endif
|
||||
|
||||
root = ext2_iget(sb, EXT2_ROOT_INO);
|
||||
if (IS_ERR(root)) {
|
||||
ret = PTR_ERR(root);
|
||||
@@ -1241,6 +1249,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
|
||||
spin_unlock(&sbi->s_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* OK, we are remounting a valid rw partition rdonly, so set
|
||||
* the rdonly flag and then mark the partition as valid again.
|
||||
@@ -1248,6 +1257,13 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
|
||||
es->s_state = cpu_to_le16(sbi->s_mount_state);
|
||||
es->s_mtime = cpu_to_le32(get_seconds());
|
||||
spin_unlock(&sbi->s_lock);
|
||||
|
||||
err = dquot_suspend(sb, -1);
|
||||
if (err < 0) {
|
||||
spin_lock(&sbi->s_lock);
|
||||
goto restore_opts;
|
||||
}
|
||||
|
||||
ext2_sync_super(sb, es, 1);
|
||||
} else {
|
||||
__le32 ret = EXT2_HAS_RO_COMPAT_FEATURE(sb,
|
||||
@@ -1269,8 +1285,12 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
|
||||
if (!ext2_setup_super (sb, es, 0))
|
||||
sb->s_flags &= ~MS_RDONLY;
|
||||
spin_unlock(&sbi->s_lock);
|
||||
|
||||
ext2_write_super(sb);
|
||||
|
||||
dquot_resume(sb, -1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
restore_opts:
|
||||
sbi->s_mount_opt = old_opts.s_mount_opt;
|
||||
|
Reference in New Issue
Block a user