diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 11:02:03 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 11:02:03 -0400 |
commit | 82681a318f9f028ea64e61f24bbd9ac535531921 (patch) | |
tree | 529b6a5b4fd040fb54b7672b1a224ebd47445876 /fs/ocfs2/super.c | |
parent | 3860c97bd60a4525bb62eb90e3e7d2f02662ac59 (diff) | |
parent | 8ebf975608aaebd7feb33d77f07ba21a6380e086 (diff) |
[SCSI] Merge branch 'linus'
Conflicts:
drivers/message/fusion/mptsas.c
fixed up conflict between req->data_len accessors and mptsas driver updates.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 79ff8d9d37e0..201b40a441fe 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/mount.h> | 42 | #include <linux/mount.h> |
43 | #include <linux/seq_file.h> | 43 | #include <linux/seq_file.h> |
44 | #include <linux/quotaops.h> | 44 | #include <linux/quotaops.h> |
45 | #include <linux/smp_lock.h> | ||
45 | 46 | ||
46 | #define MLOG_MASK_PREFIX ML_SUPER | 47 | #define MLOG_MASK_PREFIX ML_SUPER |
47 | #include <cluster/masklog.h> | 48 | #include <cluster/masklog.h> |
@@ -126,7 +127,6 @@ static int ocfs2_get_sector(struct super_block *sb, | |||
126 | struct buffer_head **bh, | 127 | struct buffer_head **bh, |
127 | int block, | 128 | int block, |
128 | int sect_size); | 129 | int sect_size); |
129 | static void ocfs2_write_super(struct super_block *sb); | ||
130 | static struct inode *ocfs2_alloc_inode(struct super_block *sb); | 130 | static struct inode *ocfs2_alloc_inode(struct super_block *sb); |
131 | static void ocfs2_destroy_inode(struct inode *inode); | 131 | static void ocfs2_destroy_inode(struct inode *inode); |
132 | static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend); | 132 | static int ocfs2_susp_quotas(struct ocfs2_super *osb, int unsuspend); |
@@ -141,7 +141,6 @@ static const struct super_operations ocfs2_sops = { | |||
141 | .clear_inode = ocfs2_clear_inode, | 141 | .clear_inode = ocfs2_clear_inode, |
142 | .delete_inode = ocfs2_delete_inode, | 142 | .delete_inode = ocfs2_delete_inode, |
143 | .sync_fs = ocfs2_sync_fs, | 143 | .sync_fs = ocfs2_sync_fs, |
144 | .write_super = ocfs2_write_super, | ||
145 | .put_super = ocfs2_put_super, | 144 | .put_super = ocfs2_put_super, |
146 | .remount_fs = ocfs2_remount, | 145 | .remount_fs = ocfs2_remount, |
147 | .show_options = ocfs2_show_options, | 146 | .show_options = ocfs2_show_options, |
@@ -365,24 +364,12 @@ static struct file_operations ocfs2_osb_debug_fops = { | |||
365 | .llseek = generic_file_llseek, | 364 | .llseek = generic_file_llseek, |
366 | }; | 365 | }; |
367 | 366 | ||
368 | /* | ||
369 | * write_super and sync_fs ripped right out of ext3. | ||
370 | */ | ||
371 | static void ocfs2_write_super(struct super_block *sb) | ||
372 | { | ||
373 | if (mutex_trylock(&sb->s_lock) != 0) | ||
374 | BUG(); | ||
375 | sb->s_dirt = 0; | ||
376 | } | ||
377 | |||
378 | static int ocfs2_sync_fs(struct super_block *sb, int wait) | 367 | static int ocfs2_sync_fs(struct super_block *sb, int wait) |
379 | { | 368 | { |
380 | int status; | 369 | int status; |
381 | tid_t target; | 370 | tid_t target; |
382 | struct ocfs2_super *osb = OCFS2_SB(sb); | 371 | struct ocfs2_super *osb = OCFS2_SB(sb); |
383 | 372 | ||
384 | sb->s_dirt = 0; | ||
385 | |||
386 | if (ocfs2_is_hard_readonly(osb)) | 373 | if (ocfs2_is_hard_readonly(osb)) |
387 | return -EROFS; | 374 | return -EROFS; |
388 | 375 | ||
@@ -595,6 +582,8 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) | |||
595 | struct mount_options parsed_options; | 582 | struct mount_options parsed_options; |
596 | struct ocfs2_super *osb = OCFS2_SB(sb); | 583 | struct ocfs2_super *osb = OCFS2_SB(sb); |
597 | 584 | ||
585 | lock_kernel(); | ||
586 | |||
598 | if (!ocfs2_parse_options(sb, data, &parsed_options, 1)) { | 587 | if (!ocfs2_parse_options(sb, data, &parsed_options, 1)) { |
599 | ret = -EINVAL; | 588 | ret = -EINVAL; |
600 | goto out; | 589 | goto out; |
@@ -698,6 +687,7 @@ unlock_osb: | |||
698 | ocfs2_set_journal_params(osb); | 687 | ocfs2_set_journal_params(osb); |
699 | } | 688 | } |
700 | out: | 689 | out: |
690 | unlock_kernel(); | ||
701 | return ret; | 691 | return ret; |
702 | } | 692 | } |
703 | 693 | ||
@@ -713,7 +703,7 @@ static int ocfs2_sb_probe(struct super_block *sb, | |||
713 | *bh = NULL; | 703 | *bh = NULL; |
714 | 704 | ||
715 | /* may be > 512 */ | 705 | /* may be > 512 */ |
716 | *sector_size = bdev_hardsect_size(sb->s_bdev); | 706 | *sector_size = bdev_logical_block_size(sb->s_bdev); |
717 | if (*sector_size > OCFS2_MAX_BLOCKSIZE) { | 707 | if (*sector_size > OCFS2_MAX_BLOCKSIZE) { |
718 | mlog(ML_ERROR, "Hardware sector size too large: %d (max=%d)\n", | 708 | mlog(ML_ERROR, "Hardware sector size too large: %d (max=%d)\n", |
719 | *sector_size, OCFS2_MAX_BLOCKSIZE); | 709 | *sector_size, OCFS2_MAX_BLOCKSIZE); |
@@ -1550,9 +1540,13 @@ static void ocfs2_put_super(struct super_block *sb) | |||
1550 | { | 1540 | { |
1551 | mlog_entry("(0x%p)\n", sb); | 1541 | mlog_entry("(0x%p)\n", sb); |
1552 | 1542 | ||
1543 | lock_kernel(); | ||
1544 | |||
1553 | ocfs2_sync_blockdev(sb); | 1545 | ocfs2_sync_blockdev(sb); |
1554 | ocfs2_dismount_volume(sb, 0); | 1546 | ocfs2_dismount_volume(sb, 0); |
1555 | 1547 | ||
1548 | unlock_kernel(); | ||
1549 | |||
1556 | mlog_exit_void(); | 1550 | mlog_exit_void(); |
1557 | } | 1551 | } |
1558 | 1552 | ||