diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-11 08:02:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-11 08:02:31 -0400 |
commit | ac0c49396d5ed9a33f08ce661635ac1bff80bb4f (patch) | |
tree | e2f066b931b133e94fde7e1157c57bef69a928e7 /fs/ext3 | |
parent | eca9fdf32dd48976eab18d310acb0b8d4cc9bf26 (diff) | |
parent | 6174c2eb8ecef271159bdcde460ce8af54d8f72f (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull UDF and quota updates from Jan Kara:
"A few UDF fixes and also a few patches which are preparing filesystems
for support of project quotas in VFS"
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
udf: Fix loading of special inodes
ocfs2: Back out change to use OCFS2_MAXQUOTAS in ocfs2_setattr()
udf: remove redundant sys_tz declaration
ocfs2: Don't use MAXQUOTAS value
reiserfs: Don't use MAXQUOTAS value
ext3: Don't use MAXQUOTAS value
udf: Fix race between write(2) and close(2)
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/ext3.h | 12 | ||||
-rw-r--r-- | fs/ext3/super.c | 14 |
2 files changed, 14 insertions, 12 deletions
diff --git a/fs/ext3/ext3.h b/fs/ext3/ext3.h index e85ff15a060e..fc3cdcf24aed 100644 --- a/fs/ext3/ext3.h +++ b/fs/ext3/ext3.h | |||
@@ -237,6 +237,8 @@ struct ext3_new_group_data { | |||
237 | #define EXT3_IOC32_GETVERSION_OLD FS_IOC32_GETVERSION | 237 | #define EXT3_IOC32_GETVERSION_OLD FS_IOC32_GETVERSION |
238 | #define EXT3_IOC32_SETVERSION_OLD FS_IOC32_SETVERSION | 238 | #define EXT3_IOC32_SETVERSION_OLD FS_IOC32_SETVERSION |
239 | 239 | ||
240 | /* Number of supported quota types */ | ||
241 | #define EXT3_MAXQUOTAS 2 | ||
240 | 242 | ||
241 | /* | 243 | /* |
242 | * Mount options | 244 | * Mount options |
@@ -248,7 +250,7 @@ struct ext3_mount_options { | |||
248 | unsigned long s_commit_interval; | 250 | unsigned long s_commit_interval; |
249 | #ifdef CONFIG_QUOTA | 251 | #ifdef CONFIG_QUOTA |
250 | int s_jquota_fmt; | 252 | int s_jquota_fmt; |
251 | char *s_qf_names[MAXQUOTAS]; | 253 | char *s_qf_names[EXT3_MAXQUOTAS]; |
252 | #endif | 254 | #endif |
253 | }; | 255 | }; |
254 | 256 | ||
@@ -669,7 +671,7 @@ struct ext3_sb_info { | |||
669 | unsigned long s_commit_interval; | 671 | unsigned long s_commit_interval; |
670 | struct block_device *journal_bdev; | 672 | struct block_device *journal_bdev; |
671 | #ifdef CONFIG_QUOTA | 673 | #ifdef CONFIG_QUOTA |
672 | char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */ | 674 | char *s_qf_names[EXT3_MAXQUOTAS]; /* Names of quota files with journalled quota */ |
673 | int s_jquota_fmt; /* Format of quota to use */ | 675 | int s_jquota_fmt; /* Format of quota to use */ |
674 | #endif | 676 | #endif |
675 | }; | 677 | }; |
@@ -1183,9 +1185,9 @@ extern const struct inode_operations ext3_fast_symlink_inode_operations; | |||
1183 | #define EXT3_QUOTA_INIT_BLOCKS(sb) 0 | 1185 | #define EXT3_QUOTA_INIT_BLOCKS(sb) 0 |
1184 | #define EXT3_QUOTA_DEL_BLOCKS(sb) 0 | 1186 | #define EXT3_QUOTA_DEL_BLOCKS(sb) 0 |
1185 | #endif | 1187 | #endif |
1186 | #define EXT3_MAXQUOTAS_TRANS_BLOCKS(sb) (MAXQUOTAS*EXT3_QUOTA_TRANS_BLOCKS(sb)) | 1188 | #define EXT3_MAXQUOTAS_TRANS_BLOCKS(sb) (EXT3_MAXQUOTAS*EXT3_QUOTA_TRANS_BLOCKS(sb)) |
1187 | #define EXT3_MAXQUOTAS_INIT_BLOCKS(sb) (MAXQUOTAS*EXT3_QUOTA_INIT_BLOCKS(sb)) | 1189 | #define EXT3_MAXQUOTAS_INIT_BLOCKS(sb) (EXT3_MAXQUOTAS*EXT3_QUOTA_INIT_BLOCKS(sb)) |
1188 | #define EXT3_MAXQUOTAS_DEL_BLOCKS(sb) (MAXQUOTAS*EXT3_QUOTA_DEL_BLOCKS(sb)) | 1190 | #define EXT3_MAXQUOTAS_DEL_BLOCKS(sb) (EXT3_MAXQUOTAS*EXT3_QUOTA_DEL_BLOCKS(sb)) |
1189 | 1191 | ||
1190 | int | 1192 | int |
1191 | ext3_mark_iloc_dirty(handle_t *handle, | 1193 | ext3_mark_iloc_dirty(handle_t *handle, |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index bb0fdacad058..7015db0bafd1 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -441,7 +441,7 @@ static void ext3_put_super (struct super_block * sb) | |||
441 | percpu_counter_destroy(&sbi->s_dirs_counter); | 441 | percpu_counter_destroy(&sbi->s_dirs_counter); |
442 | brelse(sbi->s_sbh); | 442 | brelse(sbi->s_sbh); |
443 | #ifdef CONFIG_QUOTA | 443 | #ifdef CONFIG_QUOTA |
444 | for (i = 0; i < MAXQUOTAS; i++) | 444 | for (i = 0; i < EXT3_MAXQUOTAS; i++) |
445 | kfree(sbi->s_qf_names[i]); | 445 | kfree(sbi->s_qf_names[i]); |
446 | #endif | 446 | #endif |
447 | 447 | ||
@@ -1555,7 +1555,7 @@ static void ext3_orphan_cleanup (struct super_block * sb, | |||
1555 | /* Needed for iput() to work correctly and not trash data */ | 1555 | /* Needed for iput() to work correctly and not trash data */ |
1556 | sb->s_flags |= MS_ACTIVE; | 1556 | sb->s_flags |= MS_ACTIVE; |
1557 | /* Turn on quotas so that they are updated correctly */ | 1557 | /* Turn on quotas so that they are updated correctly */ |
1558 | for (i = 0; i < MAXQUOTAS; i++) { | 1558 | for (i = 0; i < EXT3_MAXQUOTAS; i++) { |
1559 | if (EXT3_SB(sb)->s_qf_names[i]) { | 1559 | if (EXT3_SB(sb)->s_qf_names[i]) { |
1560 | int ret = ext3_quota_on_mount(sb, i); | 1560 | int ret = ext3_quota_on_mount(sb, i); |
1561 | if (ret < 0) | 1561 | if (ret < 0) |
@@ -1606,7 +1606,7 @@ static void ext3_orphan_cleanup (struct super_block * sb, | |||
1606 | PLURAL(nr_truncates)); | 1606 | PLURAL(nr_truncates)); |
1607 | #ifdef CONFIG_QUOTA | 1607 | #ifdef CONFIG_QUOTA |
1608 | /* Turn quotas off */ | 1608 | /* Turn quotas off */ |
1609 | for (i = 0; i < MAXQUOTAS; i++) { | 1609 | for (i = 0; i < EXT3_MAXQUOTAS; i++) { |
1610 | if (sb_dqopt(sb)->files[i]) | 1610 | if (sb_dqopt(sb)->files[i]) |
1611 | dquot_quota_off(sb, i); | 1611 | dquot_quota_off(sb, i); |
1612 | } | 1612 | } |
@@ -2139,7 +2139,7 @@ failed_mount2: | |||
2139 | kfree(sbi->s_group_desc); | 2139 | kfree(sbi->s_group_desc); |
2140 | failed_mount: | 2140 | failed_mount: |
2141 | #ifdef CONFIG_QUOTA | 2141 | #ifdef CONFIG_QUOTA |
2142 | for (i = 0; i < MAXQUOTAS; i++) | 2142 | for (i = 0; i < EXT3_MAXQUOTAS; i++) |
2143 | kfree(sbi->s_qf_names[i]); | 2143 | kfree(sbi->s_qf_names[i]); |
2144 | #endif | 2144 | #endif |
2145 | ext3_blkdev_remove(sbi); | 2145 | ext3_blkdev_remove(sbi); |
@@ -2659,7 +2659,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2659 | old_opts.s_commit_interval = sbi->s_commit_interval; | 2659 | old_opts.s_commit_interval = sbi->s_commit_interval; |
2660 | #ifdef CONFIG_QUOTA | 2660 | #ifdef CONFIG_QUOTA |
2661 | old_opts.s_jquota_fmt = sbi->s_jquota_fmt; | 2661 | old_opts.s_jquota_fmt = sbi->s_jquota_fmt; |
2662 | for (i = 0; i < MAXQUOTAS; i++) | 2662 | for (i = 0; i < EXT3_MAXQUOTAS; i++) |
2663 | if (sbi->s_qf_names[i]) { | 2663 | if (sbi->s_qf_names[i]) { |
2664 | old_opts.s_qf_names[i] = kstrdup(sbi->s_qf_names[i], | 2664 | old_opts.s_qf_names[i] = kstrdup(sbi->s_qf_names[i], |
2665 | GFP_KERNEL); | 2665 | GFP_KERNEL); |
@@ -2763,7 +2763,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2763 | } | 2763 | } |
2764 | #ifdef CONFIG_QUOTA | 2764 | #ifdef CONFIG_QUOTA |
2765 | /* Release old quota file names */ | 2765 | /* Release old quota file names */ |
2766 | for (i = 0; i < MAXQUOTAS; i++) | 2766 | for (i = 0; i < EXT3_MAXQUOTAS; i++) |
2767 | kfree(old_opts.s_qf_names[i]); | 2767 | kfree(old_opts.s_qf_names[i]); |
2768 | #endif | 2768 | #endif |
2769 | if (enable_quota) | 2769 | if (enable_quota) |
@@ -2777,7 +2777,7 @@ restore_opts: | |||
2777 | sbi->s_commit_interval = old_opts.s_commit_interval; | 2777 | sbi->s_commit_interval = old_opts.s_commit_interval; |
2778 | #ifdef CONFIG_QUOTA | 2778 | #ifdef CONFIG_QUOTA |
2779 | sbi->s_jquota_fmt = old_opts.s_jquota_fmt; | 2779 | sbi->s_jquota_fmt = old_opts.s_jquota_fmt; |
2780 | for (i = 0; i < MAXQUOTAS; i++) { | 2780 | for (i = 0; i < EXT3_MAXQUOTAS; i++) { |
2781 | kfree(sbi->s_qf_names[i]); | 2781 | kfree(sbi->s_qf_names[i]); |
2782 | sbi->s_qf_names[i] = old_opts.s_qf_names[i]; | 2782 | sbi->s_qf_names[i] = old_opts.s_qf_names[i]; |
2783 | } | 2783 | } |