diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/Kconfig | 3 | ||||
-rw-r--r-- | fs/afs/mntpt.c | 2 | ||||
-rw-r--r-- | fs/ext3/super.c | 11 | ||||
-rw-r--r-- | fs/ext4/super.c | 11 | ||||
-rw-r--r-- | fs/locks.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/alloc.c | 1 | ||||
-rw-r--r-- | fs/ocfs2/aops.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 1 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 69 | ||||
-rw-r--r-- | fs/proc/inode.c | 3 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 13 | ||||
-rw-r--r-- | fs/select.c | 2 |
12 files changed, 76 insertions, 46 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index 58a0650293e1..f9eed6d79066 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -441,9 +441,6 @@ config OCFS2_FS | |||
441 | 441 | ||
442 | Note: Features which OCFS2 does not support yet: | 442 | Note: Features which OCFS2 does not support yet: |
443 | - extended attributes | 443 | - extended attributes |
444 | - shared writeable mmap | ||
445 | - loopback is supported, but data written will not | ||
446 | be cluster coherent. | ||
447 | - quotas | 444 | - quotas |
448 | - cluster aware flock | 445 | - cluster aware flock |
449 | - Directory change notification (F_NOTIFY) | 446 | - Directory change notification (F_NOTIFY) |
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index a3684dcc76e7..6f8c96fb29eb 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -235,8 +235,8 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
235 | err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts); | 235 | err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts); |
236 | switch (err) { | 236 | switch (err) { |
237 | case 0: | 237 | case 0: |
238 | mntput(nd->mnt); | ||
239 | dput(nd->dentry); | 238 | dput(nd->dentry); |
239 | mntput(nd->mnt); | ||
240 | nd->mnt = newmnt; | 240 | nd->mnt = newmnt; |
241 | nd->dentry = dget(newmnt->mnt_root); | 241 | nd->dentry = dget(newmnt->mnt_root); |
242 | schedule_delayed_work(&afs_mntpt_expiry_timer, | 242 | schedule_delayed_work(&afs_mntpt_expiry_timer, |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 22cfdd61c060..9537316a0714 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2578,8 +2578,11 @@ static int ext3_release_dquot(struct dquot *dquot) | |||
2578 | 2578 | ||
2579 | handle = ext3_journal_start(dquot_to_inode(dquot), | 2579 | handle = ext3_journal_start(dquot_to_inode(dquot), |
2580 | EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb)); | 2580 | EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb)); |
2581 | if (IS_ERR(handle)) | 2581 | if (IS_ERR(handle)) { |
2582 | /* Release dquot anyway to avoid endless cycle in dqput() */ | ||
2583 | dquot_release(dquot); | ||
2582 | return PTR_ERR(handle); | 2584 | return PTR_ERR(handle); |
2585 | } | ||
2583 | ret = dquot_release(dquot); | 2586 | ret = dquot_release(dquot); |
2584 | err = ext3_journal_stop(handle); | 2587 | err = ext3_journal_stop(handle); |
2585 | if (!ret) | 2588 | if (!ret) |
@@ -2712,6 +2715,12 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type, | |||
2712 | struct buffer_head *bh; | 2715 | struct buffer_head *bh; |
2713 | handle_t *handle = journal_current_handle(); | 2716 | handle_t *handle = journal_current_handle(); |
2714 | 2717 | ||
2718 | if (!handle) { | ||
2719 | printk(KERN_WARNING "EXT3-fs: Quota write (off=%Lu, len=%Lu)" | ||
2720 | " cancelled because transaction is not started.\n", | ||
2721 | (unsigned long long)off, (unsigned long long)len); | ||
2722 | return -EIO; | ||
2723 | } | ||
2715 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); | 2724 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); |
2716 | while (towrite > 0) { | 2725 | while (towrite > 0) { |
2717 | tocopy = sb->s_blocksize - offset < towrite ? | 2726 | tocopy = sb->s_blocksize - offset < towrite ? |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 4550b83ab1c9..3c1397fa83df 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2698,8 +2698,11 @@ static int ext4_release_dquot(struct dquot *dquot) | |||
2698 | 2698 | ||
2699 | handle = ext4_journal_start(dquot_to_inode(dquot), | 2699 | handle = ext4_journal_start(dquot_to_inode(dquot), |
2700 | EXT4_QUOTA_DEL_BLOCKS(dquot->dq_sb)); | 2700 | EXT4_QUOTA_DEL_BLOCKS(dquot->dq_sb)); |
2701 | if (IS_ERR(handle)) | 2701 | if (IS_ERR(handle)) { |
2702 | /* Release dquot anyway to avoid endless cycle in dqput() */ | ||
2703 | dquot_release(dquot); | ||
2702 | return PTR_ERR(handle); | 2704 | return PTR_ERR(handle); |
2705 | } | ||
2703 | ret = dquot_release(dquot); | 2706 | ret = dquot_release(dquot); |
2704 | err = ext4_journal_stop(handle); | 2707 | err = ext4_journal_stop(handle); |
2705 | if (!ret) | 2708 | if (!ret) |
@@ -2832,6 +2835,12 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, | |||
2832 | struct buffer_head *bh; | 2835 | struct buffer_head *bh; |
2833 | handle_t *handle = journal_current_handle(); | 2836 | handle_t *handle = journal_current_handle(); |
2834 | 2837 | ||
2838 | if (!handle) { | ||
2839 | printk(KERN_WARNING "EXT4-fs: Quota write (off=%Lu, len=%Lu)" | ||
2840 | " cancelled because transaction is not started.\n", | ||
2841 | (unsigned long long)off, (unsigned long long)len); | ||
2842 | return -EIO; | ||
2843 | } | ||
2835 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); | 2844 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); |
2836 | while (towrite > 0) { | 2845 | while (towrite > 0) { |
2837 | tocopy = sb->s_blocksize - offset < towrite ? | 2846 | tocopy = sb->s_blocksize - offset < towrite ? |
diff --git a/fs/locks.c b/fs/locks.c index 50857d2d3404..c795eaaf6c4c 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -782,7 +782,7 @@ find_conflict: | |||
782 | if (request->fl_flags & FL_ACCESS) | 782 | if (request->fl_flags & FL_ACCESS) |
783 | goto out; | 783 | goto out; |
784 | locks_copy_lock(new_fl, request); | 784 | locks_copy_lock(new_fl, request); |
785 | locks_insert_lock(&inode->i_flock, new_fl); | 785 | locks_insert_lock(before, new_fl); |
786 | new_fl = NULL; | 786 | new_fl = NULL; |
787 | error = 0; | 787 | error = 0; |
788 | 788 | ||
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 4f517665c9a0..778a850b4634 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -5602,6 +5602,7 @@ static int ocfs2_do_truncate(struct ocfs2_super *osb, | |||
5602 | clusters_to_del; | 5602 | clusters_to_del; |
5603 | spin_unlock(&OCFS2_I(inode)->ip_lock); | 5603 | spin_unlock(&OCFS2_I(inode)->ip_lock); |
5604 | le32_add_cpu(&fe->i_clusters, -clusters_to_del); | 5604 | le32_add_cpu(&fe->i_clusters, -clusters_to_del); |
5605 | inode->i_blocks = ocfs2_inode_sector_count(inode); | ||
5605 | 5606 | ||
5606 | status = ocfs2_trim_tree(inode, path, handle, tc, | 5607 | status = ocfs2_trim_tree(inode, path, handle, tc, |
5607 | clusters_to_del, &delete_blk); | 5608 | clusters_to_del, &delete_blk); |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 460d440310f2..50cd8a209012 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -855,6 +855,7 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp, | |||
855 | struct ocfs2_super *osb, loff_t pos, | 855 | struct ocfs2_super *osb, loff_t pos, |
856 | unsigned len, struct buffer_head *di_bh) | 856 | unsigned len, struct buffer_head *di_bh) |
857 | { | 857 | { |
858 | u32 cend; | ||
858 | struct ocfs2_write_ctxt *wc; | 859 | struct ocfs2_write_ctxt *wc; |
859 | 860 | ||
860 | wc = kzalloc(sizeof(struct ocfs2_write_ctxt), GFP_NOFS); | 861 | wc = kzalloc(sizeof(struct ocfs2_write_ctxt), GFP_NOFS); |
@@ -862,7 +863,8 @@ static int ocfs2_alloc_write_ctxt(struct ocfs2_write_ctxt **wcp, | |||
862 | return -ENOMEM; | 863 | return -ENOMEM; |
863 | 864 | ||
864 | wc->w_cpos = pos >> osb->s_clustersize_bits; | 865 | wc->w_cpos = pos >> osb->s_clustersize_bits; |
865 | wc->w_clen = ocfs2_clusters_for_bytes(osb->sb, len); | 866 | cend = (pos + len - 1) >> osb->s_clustersize_bits; |
867 | wc->w_clen = cend - wc->w_cpos + 1; | ||
866 | get_bh(di_bh); | 868 | get_bh(di_bh); |
867 | wc->w_di_bh = di_bh; | 869 | wc->w_di_bh = di_bh; |
868 | 870 | ||
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 4ffa715be09c..7e34e66159c6 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -314,7 +314,6 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb, | |||
314 | } | 314 | } |
315 | 315 | ||
316 | i_size_write(inode, new_i_size); | 316 | i_size_write(inode, new_i_size); |
317 | inode->i_blocks = ocfs2_align_bytes_to_sectors(new_i_size); | ||
318 | inode->i_ctime = inode->i_mtime = CURRENT_TIME; | 317 | inode->i_ctime = inode->i_mtime = CURRENT_TIME; |
319 | 318 | ||
320 | di = (struct ocfs2_dinode *) fe_bh->b_data; | 319 | di = (struct ocfs2_dinode *) fe_bh->b_data; |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index f2fc9a795deb..c034b5129c1e 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -81,8 +81,15 @@ static struct dentry *ocfs2_debugfs_root = NULL; | |||
81 | MODULE_AUTHOR("Oracle"); | 81 | MODULE_AUTHOR("Oracle"); |
82 | MODULE_LICENSE("GPL"); | 82 | MODULE_LICENSE("GPL"); |
83 | 83 | ||
84 | struct mount_options | ||
85 | { | ||
86 | unsigned long mount_opt; | ||
87 | unsigned int atime_quantum; | ||
88 | signed short slot; | ||
89 | }; | ||
90 | |||
84 | static int ocfs2_parse_options(struct super_block *sb, char *options, | 91 | static int ocfs2_parse_options(struct super_block *sb, char *options, |
85 | unsigned long *mount_opt, s16 *slot, | 92 | struct mount_options *mopt, |
86 | int is_remount); | 93 | int is_remount); |
87 | static void ocfs2_put_super(struct super_block *sb); | 94 | static void ocfs2_put_super(struct super_block *sb); |
88 | static int ocfs2_mount_volume(struct super_block *sb); | 95 | static int ocfs2_mount_volume(struct super_block *sb); |
@@ -367,24 +374,23 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) | |||
367 | { | 374 | { |
368 | int incompat_features; | 375 | int incompat_features; |
369 | int ret = 0; | 376 | int ret = 0; |
370 | unsigned long parsed_options; | 377 | struct mount_options parsed_options; |
371 | s16 slot; | ||
372 | struct ocfs2_super *osb = OCFS2_SB(sb); | 378 | struct ocfs2_super *osb = OCFS2_SB(sb); |
373 | 379 | ||
374 | if (!ocfs2_parse_options(sb, data, &parsed_options, &slot, 1)) { | 380 | if (!ocfs2_parse_options(sb, data, &parsed_options, 1)) { |
375 | ret = -EINVAL; | 381 | ret = -EINVAL; |
376 | goto out; | 382 | goto out; |
377 | } | 383 | } |
378 | 384 | ||
379 | if ((osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) != | 385 | if ((osb->s_mount_opt & OCFS2_MOUNT_HB_LOCAL) != |
380 | (parsed_options & OCFS2_MOUNT_HB_LOCAL)) { | 386 | (parsed_options.mount_opt & OCFS2_MOUNT_HB_LOCAL)) { |
381 | ret = -EINVAL; | 387 | ret = -EINVAL; |
382 | mlog(ML_ERROR, "Cannot change heartbeat mode on remount\n"); | 388 | mlog(ML_ERROR, "Cannot change heartbeat mode on remount\n"); |
383 | goto out; | 389 | goto out; |
384 | } | 390 | } |
385 | 391 | ||
386 | if ((osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK) != | 392 | if ((osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK) != |
387 | (parsed_options & OCFS2_MOUNT_DATA_WRITEBACK)) { | 393 | (parsed_options.mount_opt & OCFS2_MOUNT_DATA_WRITEBACK)) { |
388 | ret = -EINVAL; | 394 | ret = -EINVAL; |
389 | mlog(ML_ERROR, "Cannot change data mode on remount\n"); | 395 | mlog(ML_ERROR, "Cannot change data mode on remount\n"); |
390 | goto out; | 396 | goto out; |
@@ -435,7 +441,9 @@ unlock_osb: | |||
435 | 441 | ||
436 | /* Only save off the new mount options in case of a successful | 442 | /* Only save off the new mount options in case of a successful |
437 | * remount. */ | 443 | * remount. */ |
438 | osb->s_mount_opt = parsed_options; | 444 | osb->s_mount_opt = parsed_options.mount_opt; |
445 | osb->s_atime_quantum = parsed_options.atime_quantum; | ||
446 | osb->preferred_slot = parsed_options.slot; | ||
439 | } | 447 | } |
440 | out: | 448 | out: |
441 | return ret; | 449 | return ret; |
@@ -547,8 +555,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | |||
547 | { | 555 | { |
548 | struct dentry *root; | 556 | struct dentry *root; |
549 | int status, sector_size; | 557 | int status, sector_size; |
550 | unsigned long parsed_opt; | 558 | struct mount_options parsed_options; |
551 | s16 slot; | ||
552 | struct inode *inode = NULL; | 559 | struct inode *inode = NULL; |
553 | struct ocfs2_super *osb = NULL; | 560 | struct ocfs2_super *osb = NULL; |
554 | struct buffer_head *bh = NULL; | 561 | struct buffer_head *bh = NULL; |
@@ -556,14 +563,14 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | |||
556 | 563 | ||
557 | mlog_entry("%p, %p, %i", sb, data, silent); | 564 | mlog_entry("%p, %p, %i", sb, data, silent); |
558 | 565 | ||
559 | if (!ocfs2_parse_options(sb, data, &parsed_opt, &slot, 0)) { | 566 | if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) { |
560 | status = -EINVAL; | 567 | status = -EINVAL; |
561 | goto read_super_error; | 568 | goto read_super_error; |
562 | } | 569 | } |
563 | 570 | ||
564 | /* for now we only have one cluster/node, make sure we see it | 571 | /* for now we only have one cluster/node, make sure we see it |
565 | * in the heartbeat universe */ | 572 | * in the heartbeat universe */ |
566 | if (parsed_opt & OCFS2_MOUNT_HB_LOCAL) { | 573 | if (parsed_options.mount_opt & OCFS2_MOUNT_HB_LOCAL) { |
567 | if (!o2hb_check_local_node_heartbeating()) { | 574 | if (!o2hb_check_local_node_heartbeating()) { |
568 | status = -EINVAL; | 575 | status = -EINVAL; |
569 | goto read_super_error; | 576 | goto read_super_error; |
@@ -585,8 +592,9 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | |||
585 | } | 592 | } |
586 | brelse(bh); | 593 | brelse(bh); |
587 | bh = NULL; | 594 | bh = NULL; |
588 | osb->s_mount_opt = parsed_opt; | 595 | osb->s_mount_opt = parsed_options.mount_opt; |
589 | osb->preferred_slot = slot; | 596 | osb->s_atime_quantum = parsed_options.atime_quantum; |
597 | osb->preferred_slot = parsed_options.slot; | ||
590 | 598 | ||
591 | sb->s_magic = OCFS2_SUPER_MAGIC; | 599 | sb->s_magic = OCFS2_SUPER_MAGIC; |
592 | 600 | ||
@@ -728,8 +736,7 @@ static struct file_system_type ocfs2_fs_type = { | |||
728 | 736 | ||
729 | static int ocfs2_parse_options(struct super_block *sb, | 737 | static int ocfs2_parse_options(struct super_block *sb, |
730 | char *options, | 738 | char *options, |
731 | unsigned long *mount_opt, | 739 | struct mount_options *mopt, |
732 | s16 *slot, | ||
733 | int is_remount) | 740 | int is_remount) |
734 | { | 741 | { |
735 | int status; | 742 | int status; |
@@ -738,8 +745,9 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
738 | mlog_entry("remount: %d, options: \"%s\"\n", is_remount, | 745 | mlog_entry("remount: %d, options: \"%s\"\n", is_remount, |
739 | options ? options : "(none)"); | 746 | options ? options : "(none)"); |
740 | 747 | ||
741 | *mount_opt = 0; | 748 | mopt->mount_opt = 0; |
742 | *slot = OCFS2_INVALID_SLOT; | 749 | mopt->atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM; |
750 | mopt->slot = OCFS2_INVALID_SLOT; | ||
743 | 751 | ||
744 | if (!options) { | 752 | if (!options) { |
745 | status = 1; | 753 | status = 1; |
@@ -749,7 +757,6 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
749 | while ((p = strsep(&options, ",")) != NULL) { | 757 | while ((p = strsep(&options, ",")) != NULL) { |
750 | int token, option; | 758 | int token, option; |
751 | substring_t args[MAX_OPT_ARGS]; | 759 | substring_t args[MAX_OPT_ARGS]; |
752 | struct ocfs2_super * osb = OCFS2_SB(sb); | ||
753 | 760 | ||
754 | if (!*p) | 761 | if (!*p) |
755 | continue; | 762 | continue; |
@@ -757,10 +764,10 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
757 | token = match_token(p, tokens, args); | 764 | token = match_token(p, tokens, args); |
758 | switch (token) { | 765 | switch (token) { |
759 | case Opt_hb_local: | 766 | case Opt_hb_local: |
760 | *mount_opt |= OCFS2_MOUNT_HB_LOCAL; | 767 | mopt->mount_opt |= OCFS2_MOUNT_HB_LOCAL; |
761 | break; | 768 | break; |
762 | case Opt_hb_none: | 769 | case Opt_hb_none: |
763 | *mount_opt &= ~OCFS2_MOUNT_HB_LOCAL; | 770 | mopt->mount_opt &= ~OCFS2_MOUNT_HB_LOCAL; |
764 | break; | 771 | break; |
765 | case Opt_barrier: | 772 | case Opt_barrier: |
766 | if (match_int(&args[0], &option)) { | 773 | if (match_int(&args[0], &option)) { |
@@ -768,27 +775,27 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
768 | goto bail; | 775 | goto bail; |
769 | } | 776 | } |
770 | if (option) | 777 | if (option) |
771 | *mount_opt |= OCFS2_MOUNT_BARRIER; | 778 | mopt->mount_opt |= OCFS2_MOUNT_BARRIER; |
772 | else | 779 | else |
773 | *mount_opt &= ~OCFS2_MOUNT_BARRIER; | 780 | mopt->mount_opt &= ~OCFS2_MOUNT_BARRIER; |
774 | break; | 781 | break; |
775 | case Opt_intr: | 782 | case Opt_intr: |
776 | *mount_opt &= ~OCFS2_MOUNT_NOINTR; | 783 | mopt->mount_opt &= ~OCFS2_MOUNT_NOINTR; |
777 | break; | 784 | break; |
778 | case Opt_nointr: | 785 | case Opt_nointr: |
779 | *mount_opt |= OCFS2_MOUNT_NOINTR; | 786 | mopt->mount_opt |= OCFS2_MOUNT_NOINTR; |
780 | break; | 787 | break; |
781 | case Opt_err_panic: | 788 | case Opt_err_panic: |
782 | *mount_opt |= OCFS2_MOUNT_ERRORS_PANIC; | 789 | mopt->mount_opt |= OCFS2_MOUNT_ERRORS_PANIC; |
783 | break; | 790 | break; |
784 | case Opt_err_ro: | 791 | case Opt_err_ro: |
785 | *mount_opt &= ~OCFS2_MOUNT_ERRORS_PANIC; | 792 | mopt->mount_opt &= ~OCFS2_MOUNT_ERRORS_PANIC; |
786 | break; | 793 | break; |
787 | case Opt_data_ordered: | 794 | case Opt_data_ordered: |
788 | *mount_opt &= ~OCFS2_MOUNT_DATA_WRITEBACK; | 795 | mopt->mount_opt &= ~OCFS2_MOUNT_DATA_WRITEBACK; |
789 | break; | 796 | break; |
790 | case Opt_data_writeback: | 797 | case Opt_data_writeback: |
791 | *mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; | 798 | mopt->mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; |
792 | break; | 799 | break; |
793 | case Opt_atime_quantum: | 800 | case Opt_atime_quantum: |
794 | if (match_int(&args[0], &option)) { | 801 | if (match_int(&args[0], &option)) { |
@@ -796,9 +803,7 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
796 | goto bail; | 803 | goto bail; |
797 | } | 804 | } |
798 | if (option >= 0) | 805 | if (option >= 0) |
799 | osb->s_atime_quantum = option; | 806 | mopt->atime_quantum = option; |
800 | else | ||
801 | osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM; | ||
802 | break; | 807 | break; |
803 | case Opt_slot: | 808 | case Opt_slot: |
804 | option = 0; | 809 | option = 0; |
@@ -807,7 +812,7 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
807 | goto bail; | 812 | goto bail; |
808 | } | 813 | } |
809 | if (option) | 814 | if (option) |
810 | *slot = (s16)option; | 815 | mopt->slot = (s16)option; |
811 | break; | 816 | break; |
812 | default: | 817 | default: |
813 | mlog(ML_ERROR, | 818 | mlog(ML_ERROR, |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index a5b0dfd89a17..0e4d37c93eea 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/stat.h> | 12 | #include <linux/stat.h> |
13 | #include <linux/completion.h> | 13 | #include <linux/completion.h> |
14 | #include <linux/poll.h> | ||
14 | #include <linux/file.h> | 15 | #include <linux/file.h> |
15 | #include <linux/limits.h> | 16 | #include <linux/limits.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -232,7 +233,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t | |||
232 | static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) | 233 | static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) |
233 | { | 234 | { |
234 | struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); | 235 | struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); |
235 | unsigned int rv = 0; | 236 | unsigned int rv = DEFAULT_POLLMASK; |
236 | unsigned int (*poll)(struct file *, struct poll_table_struct *); | 237 | unsigned int (*poll)(struct file *, struct poll_table_struct *); |
237 | 238 | ||
238 | spin_lock(&pde->pde_unload_lock); | 239 | spin_lock(&pde->pde_unload_lock); |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 5b68dd3f191a..a005451930b7 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1915,8 +1915,11 @@ static int reiserfs_release_dquot(struct dquot *dquot) | |||
1915 | ret = | 1915 | ret = |
1916 | journal_begin(&th, dquot->dq_sb, | 1916 | journal_begin(&th, dquot->dq_sb, |
1917 | REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb)); | 1917 | REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb)); |
1918 | if (ret) | 1918 | if (ret) { |
1919 | /* Release dquot anyway to avoid endless cycle in dqput() */ | ||
1920 | dquot_release(dquot); | ||
1919 | goto out; | 1921 | goto out; |
1922 | } | ||
1920 | ret = dquot_release(dquot); | 1923 | ret = dquot_release(dquot); |
1921 | err = | 1924 | err = |
1922 | journal_end(&th, dquot->dq_sb, | 1925 | journal_end(&th, dquot->dq_sb, |
@@ -2067,6 +2070,12 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type, | |||
2067 | size_t towrite = len; | 2070 | size_t towrite = len; |
2068 | struct buffer_head tmp_bh, *bh; | 2071 | struct buffer_head tmp_bh, *bh; |
2069 | 2072 | ||
2073 | if (!current->journal_info) { | ||
2074 | printk(KERN_WARNING "reiserfs: Quota write (off=%Lu, len=%Lu)" | ||
2075 | " cancelled because transaction is not started.\n", | ||
2076 | (unsigned long long)off, (unsigned long long)len); | ||
2077 | return -EIO; | ||
2078 | } | ||
2070 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); | 2079 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); |
2071 | while (towrite > 0) { | 2080 | while (towrite > 0) { |
2072 | tocopy = sb->s_blocksize - offset < towrite ? | 2081 | tocopy = sb->s_blocksize - offset < towrite ? |
@@ -2098,7 +2107,7 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type, | |||
2098 | data += tocopy; | 2107 | data += tocopy; |
2099 | blk++; | 2108 | blk++; |
2100 | } | 2109 | } |
2101 | out: | 2110 | out: |
2102 | if (len == towrite) | 2111 | if (len == towrite) |
2103 | return err; | 2112 | return err; |
2104 | if (inode->i_size < off + len - towrite) | 2113 | if (inode->i_size < off + len - towrite) |
diff --git a/fs/select.c b/fs/select.c index a974082b0824..46dca31c607a 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -26,8 +26,6 @@ | |||
26 | 26 | ||
27 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
28 | 28 | ||
29 | #define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) | ||
30 | |||
31 | struct poll_table_page { | 29 | struct poll_table_page { |
32 | struct poll_table_page * next; | 30 | struct poll_table_page * next; |
33 | struct poll_table_entry * entry; | 31 | struct poll_table_entry * entry; |