aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r--fs/ext3/super.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 9e24ceb019fe..f594989ccb7a 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -36,9 +36,12 @@
36#include <linux/namei.h> 36#include <linux/namei.h>
37#include <linux/quotaops.h> 37#include <linux/quotaops.h>
38#include <linux/seq_file.h> 38#include <linux/seq_file.h>
39
39#include <asm/uaccess.h> 40#include <asm/uaccess.h>
41
40#include "xattr.h" 42#include "xattr.h"
41#include "acl.h" 43#include "acl.h"
44#include "namei.h"
42 45
43static int ext3_load_journal(struct super_block *, struct ext3_super_block *); 46static int ext3_load_journal(struct super_block *, struct ext3_super_block *);
44static int ext3_create_journal(struct super_block *, struct ext3_super_block *, 47static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
@@ -510,19 +513,11 @@ static void ext3_clear_inode(struct inode *inode)
510 kfree(rsv); 513 kfree(rsv);
511} 514}
512 515
513static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) 516static inline void ext3_show_quota_options(struct seq_file *seq, struct super_block *sb)
514{ 517{
515 struct super_block *sb = vfs->mnt_sb; 518#if defined(CONFIG_QUOTA)
516 struct ext3_sb_info *sbi = EXT3_SB(sb); 519 struct ext3_sb_info *sbi = EXT3_SB(sb);
517 520
518 if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA)
519 seq_puts(seq, ",data=journal");
520 else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA)
521 seq_puts(seq, ",data=ordered");
522 else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)
523 seq_puts(seq, ",data=writeback");
524
525#if defined(CONFIG_QUOTA)
526 if (sbi->s_jquota_fmt) 521 if (sbi->s_jquota_fmt)
527 seq_printf(seq, ",jqfmt=%s", 522 seq_printf(seq, ",jqfmt=%s",
528 (sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold": "vfsv0"); 523 (sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold": "vfsv0");
@@ -539,6 +534,20 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
539 if (sbi->s_mount_opt & EXT3_MOUNT_GRPQUOTA) 534 if (sbi->s_mount_opt & EXT3_MOUNT_GRPQUOTA)
540 seq_puts(seq, ",grpquota"); 535 seq_puts(seq, ",grpquota");
541#endif 536#endif
537}
538
539static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
540{
541 struct super_block *sb = vfs->mnt_sb;
542
543 if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA)
544 seq_puts(seq, ",data=journal");
545 else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA)
546 seq_puts(seq, ",data=ordered");
547 else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)
548 seq_puts(seq, ",data=writeback");
549
550 ext3_show_quota_options(seq, sb);
542 551
543 return 0; 552 return 0;
544} 553}
@@ -609,7 +618,6 @@ static struct super_operations ext3_sops = {
609#endif 618#endif
610}; 619};
611 620
612struct dentry *ext3_get_parent(struct dentry *child);
613static struct export_operations ext3_export_ops = { 621static struct export_operations ext3_export_ops = {
614 .get_parent = ext3_get_parent, 622 .get_parent = ext3_get_parent,
615}; 623};