Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105841
b: refs/heads/master
c: d06bf1d
h: refs/heads/master
i:
  105839: 6f4f626
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Jul 25, 2008
1 parent 92811e9 commit 7ca2dc4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99aeaf639f61ab6be1967e5f92e2e28dafad8383
refs/heads/master: d06bf1d252fe16f5f0d13e04da7a9913420aa1cf
29 changes: 22 additions & 7 deletions trunk/fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ static int parse_options (char *options, struct super_block *sb,
int data_opt = 0;
int option;
#ifdef CONFIG_QUOTA
int qtype;
int qtype, qfmt;
char *qname;
#endif

Expand Down Expand Up @@ -1018,7 +1018,9 @@ static int parse_options (char *options, struct super_block *sb,
case Opt_grpjquota:
qtype = GRPQUOTA;
set_qf_name:
if (sb_any_quota_enabled(sb)) {
if ((sb_any_quota_enabled(sb) ||
sb_any_quota_suspended(sb)) &&
!sbi->s_qf_names[qtype]) {
printk(KERN_ERR
"EXT3-fs: Cannot change journaled "
"quota options when quota turned on.\n");
Expand Down Expand Up @@ -1056,7 +1058,9 @@ static int parse_options (char *options, struct super_block *sb,
case Opt_offgrpjquota:
qtype = GRPQUOTA;
clear_qf_name:
if (sb_any_quota_enabled(sb)) {
if ((sb_any_quota_enabled(sb) ||
sb_any_quota_suspended(sb)) &&
sbi->s_qf_names[qtype]) {
printk(KERN_ERR "EXT3-fs: Cannot change "
"journaled quota options when "
"quota turned on.\n");
Expand All @@ -1069,10 +1073,20 @@ static int parse_options (char *options, struct super_block *sb,
sbi->s_qf_names[qtype] = NULL;
break;
case Opt_jqfmt_vfsold:
sbi->s_jquota_fmt = QFMT_VFS_OLD;
break;
qfmt = QFMT_VFS_OLD;
goto set_qf_format;
case Opt_jqfmt_vfsv0:
sbi->s_jquota_fmt = QFMT_VFS_V0;
qfmt = QFMT_VFS_V0;
set_qf_format:
if ((sb_any_quota_enabled(sb) ||
sb_any_quota_suspended(sb)) &&
sbi->s_jquota_fmt != qfmt) {
printk(KERN_ERR "EXT3-fs: Cannot change "
"journaled quota options when "
"quota turned on.\n");
return 0;
}
sbi->s_jquota_fmt = qfmt;
break;
case Opt_quota:
case Opt_usrquota:
Expand All @@ -1084,7 +1098,8 @@ static int parse_options (char *options, struct super_block *sb,
set_opt(sbi->s_mount_opt, GRPQUOTA);
break;
case Opt_noquota:
if (sb_any_quota_enabled(sb)) {
if (sb_any_quota_enabled(sb) ||
sb_any_quota_suspended(sb)) {
printk(KERN_ERR "EXT3-fs: Cannot change quota "
"options when quota turned on.\n");
return 0;
Expand Down

0 comments on commit 7ca2dc4

Please sign in to comment.