diff options
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r-- | fs/jfs/super.c | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index ee32211288ce..71bc34b96b2b 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -23,9 +23,11 @@ | |||
23 | #include <linux/parser.h> | 23 | #include <linux/parser.h> |
24 | #include <linux/completion.h> | 24 | #include <linux/completion.h> |
25 | #include <linux/vfs.h> | 25 | #include <linux/vfs.h> |
26 | #include <linux/mount.h> | ||
26 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
27 | #include <linux/posix_acl.h> | 28 | #include <linux/posix_acl.h> |
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
30 | #include <linux/seq_file.h> | ||
29 | 31 | ||
30 | #include "jfs_incore.h" | 32 | #include "jfs_incore.h" |
31 | #include "jfs_filsys.h" | 33 | #include "jfs_filsys.h" |
@@ -114,6 +116,8 @@ static void jfs_destroy_inode(struct inode *inode) | |||
114 | { | 116 | { |
115 | struct jfs_inode_info *ji = JFS_IP(inode); | 117 | struct jfs_inode_info *ji = JFS_IP(inode); |
116 | 118 | ||
119 | BUG_ON(!list_empty(&ji->anon_inode_list)); | ||
120 | |||
117 | spin_lock_irq(&ji->ag_lock); | 121 | spin_lock_irq(&ji->ag_lock); |
118 | if (ji->active_ag != -1) { | 122 | if (ji->active_ag != -1) { |
119 | struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; | 123 | struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; |
@@ -190,7 +194,8 @@ static void jfs_put_super(struct super_block *sb) | |||
190 | 194 | ||
191 | enum { | 195 | enum { |
192 | Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize, | 196 | Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize, |
193 | Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, | 197 | Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, Opt_quota, |
198 | Opt_usrquota, Opt_grpquota | ||
194 | }; | 199 | }; |
195 | 200 | ||
196 | static match_table_t tokens = { | 201 | static match_table_t tokens = { |
@@ -202,8 +207,8 @@ static match_table_t tokens = { | |||
202 | {Opt_errors, "errors=%s"}, | 207 | {Opt_errors, "errors=%s"}, |
203 | {Opt_ignore, "noquota"}, | 208 | {Opt_ignore, "noquota"}, |
204 | {Opt_ignore, "quota"}, | 209 | {Opt_ignore, "quota"}, |
205 | {Opt_ignore, "usrquota"}, | 210 | {Opt_usrquota, "usrquota"}, |
206 | {Opt_ignore, "grpquota"}, | 211 | {Opt_grpquota, "grpquota"}, |
207 | {Opt_err, NULL} | 212 | {Opt_err, NULL} |
208 | }; | 213 | }; |
209 | 214 | ||
@@ -291,6 +296,24 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, | |||
291 | } | 296 | } |
292 | break; | 297 | break; |
293 | } | 298 | } |
299 | |||
300 | #if defined(CONFIG_QUOTA) | ||
301 | case Opt_quota: | ||
302 | case Opt_usrquota: | ||
303 | *flag |= JFS_USRQUOTA; | ||
304 | break; | ||
305 | case Opt_grpquota: | ||
306 | *flag |= JFS_GRPQUOTA; | ||
307 | break; | ||
308 | #else | ||
309 | case Opt_usrquota: | ||
310 | case Opt_grpquota: | ||
311 | case Opt_quota: | ||
312 | printk(KERN_ERR | ||
313 | "JFS: quota operations not supported\n"); | ||
314 | break; | ||
315 | #endif | ||
316 | |||
294 | default: | 317 | default: |
295 | printk("jfs: Unrecognized mount option \"%s\" " | 318 | printk("jfs: Unrecognized mount option \"%s\" " |
296 | " or missing value\n", p); | 319 | " or missing value\n", p); |
@@ -531,12 +554,32 @@ static int jfs_sync_fs(struct super_block *sb, int wait) | |||
531 | /* log == NULL indicates read-only mount */ | 554 | /* log == NULL indicates read-only mount */ |
532 | if (log) { | 555 | if (log) { |
533 | jfs_flush_journal(log, wait); | 556 | jfs_flush_journal(log, wait); |
534 | jfs_syncpt(log); | 557 | jfs_syncpt(log, 0); |
535 | } | 558 | } |
536 | 559 | ||
537 | return 0; | 560 | return 0; |
538 | } | 561 | } |
539 | 562 | ||
563 | static int jfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | ||
564 | { | ||
565 | struct jfs_sb_info *sbi = JFS_SBI(vfs->mnt_sb); | ||
566 | |||
567 | if (sbi->flag & JFS_NOINTEGRITY) | ||
568 | seq_puts(seq, ",nointegrity"); | ||
569 | else | ||
570 | seq_puts(seq, ",integrity"); | ||
571 | |||
572 | #if defined(CONFIG_QUOTA) | ||
573 | if (sbi->flag & JFS_USRQUOTA) | ||
574 | seq_puts(seq, ",usrquota"); | ||
575 | |||
576 | if (sbi->flag & JFS_GRPQUOTA) | ||
577 | seq_puts(seq, ",grpquota"); | ||
578 | #endif | ||
579 | |||
580 | return 0; | ||
581 | } | ||
582 | |||
540 | static struct super_operations jfs_super_operations = { | 583 | static struct super_operations jfs_super_operations = { |
541 | .alloc_inode = jfs_alloc_inode, | 584 | .alloc_inode = jfs_alloc_inode, |
542 | .destroy_inode = jfs_destroy_inode, | 585 | .destroy_inode = jfs_destroy_inode, |
@@ -550,6 +593,7 @@ static struct super_operations jfs_super_operations = { | |||
550 | .unlockfs = jfs_unlockfs, | 593 | .unlockfs = jfs_unlockfs, |
551 | .statfs = jfs_statfs, | 594 | .statfs = jfs_statfs, |
552 | .remount_fs = jfs_remount, | 595 | .remount_fs = jfs_remount, |
596 | .show_options = jfs_show_options | ||
553 | }; | 597 | }; |
554 | 598 | ||
555 | static struct export_operations jfs_export_operations = { | 599 | static struct export_operations jfs_export_operations = { |