diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-31 15:34:58 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-03-31 15:34:58 -0500 |
commit | 86579dd06deecfa6ac88d5e84e4d63c397cd6f6d (patch) | |
tree | b4475d3ccde53015ad84a06e4e55e64591171b75 /fs/ext3/super.c | |
parent | 7ea9ea832212c4a755650f7c7cc1ff0b63292a41 (diff) | |
parent | a0f067802576d4eb4c65d40b8ee7d6ea3c81dd61 (diff) |
Merge branch 'master'
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r-- | fs/ext3/super.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 56bf76586019..f8a5266ea1ff 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -472,7 +472,7 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) | |||
472 | #ifdef CONFIG_EXT3_FS_XATTR | 472 | #ifdef CONFIG_EXT3_FS_XATTR |
473 | init_rwsem(&ei->xattr_sem); | 473 | init_rwsem(&ei->xattr_sem); |
474 | #endif | 474 | #endif |
475 | init_MUTEX(&ei->truncate_sem); | 475 | mutex_init(&ei->truncate_mutex); |
476 | inode_init_once(&ei->vfs_inode); | 476 | inode_init_once(&ei->vfs_inode); |
477 | } | 477 | } |
478 | } | 478 | } |
@@ -481,7 +481,8 @@ static int init_inodecache(void) | |||
481 | { | 481 | { |
482 | ext3_inode_cachep = kmem_cache_create("ext3_inode_cache", | 482 | ext3_inode_cachep = kmem_cache_create("ext3_inode_cache", |
483 | sizeof(struct ext3_inode_info), | 483 | sizeof(struct ext3_inode_info), |
484 | 0, SLAB_RECLAIM_ACCOUNT, | 484 | 0, (SLAB_RECLAIM_ACCOUNT| |
485 | SLAB_MEM_SPREAD), | ||
485 | init_once, NULL); | 486 | init_once, NULL); |
486 | if (ext3_inode_cachep == NULL) | 487 | if (ext3_inode_cachep == NULL) |
487 | return -ENOMEM; | 488 | return -ENOMEM; |
@@ -1677,12 +1678,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
1677 | } | 1678 | } |
1678 | 1679 | ||
1679 | if (test_opt(sb, NOBH)) { | 1680 | if (test_opt(sb, NOBH)) { |
1680 | if (sb->s_blocksize_bits != PAGE_CACHE_SHIFT) { | ||
1681 | printk(KERN_WARNING "EXT3-fs: Ignoring nobh option " | ||
1682 | "since filesystem blocksize doesn't match " | ||
1683 | "pagesize\n"); | ||
1684 | clear_opt(sbi->s_mount_opt, NOBH); | ||
1685 | } | ||
1686 | if (!(test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)) { | 1681 | if (!(test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)) { |
1687 | printk(KERN_WARNING "EXT3-fs: Ignoring nobh option - " | 1682 | printk(KERN_WARNING "EXT3-fs: Ignoring nobh option - " |
1688 | "its supported only with writeback mode\n"); | 1683 | "its supported only with writeback mode\n"); |
@@ -2325,7 +2320,8 @@ restore_opts: | |||
2325 | 2320 | ||
2326 | static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) | 2321 | static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) |
2327 | { | 2322 | { |
2328 | struct ext3_super_block *es = EXT3_SB(sb)->s_es; | 2323 | struct ext3_sb_info *sbi = EXT3_SB(sb); |
2324 | struct ext3_super_block *es = sbi->s_es; | ||
2329 | unsigned long overhead; | 2325 | unsigned long overhead; |
2330 | int i; | 2326 | int i; |
2331 | 2327 | ||
@@ -2367,12 +2363,12 @@ static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) | |||
2367 | buf->f_type = EXT3_SUPER_MAGIC; | 2363 | buf->f_type = EXT3_SUPER_MAGIC; |
2368 | buf->f_bsize = sb->s_blocksize; | 2364 | buf->f_bsize = sb->s_blocksize; |
2369 | buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead; | 2365 | buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead; |
2370 | buf->f_bfree = ext3_count_free_blocks (sb); | 2366 | buf->f_bfree = percpu_counter_sum(&sbi->s_freeblocks_counter); |
2371 | buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count); | 2367 | buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count); |
2372 | if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count)) | 2368 | if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count)) |
2373 | buf->f_bavail = 0; | 2369 | buf->f_bavail = 0; |
2374 | buf->f_files = le32_to_cpu(es->s_inodes_count); | 2370 | buf->f_files = le32_to_cpu(es->s_inodes_count); |
2375 | buf->f_ffree = ext3_count_free_inodes (sb); | 2371 | buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter); |
2376 | buf->f_namelen = EXT3_NAME_LEN; | 2372 | buf->f_namelen = EXT3_NAME_LEN; |
2377 | return 0; | 2373 | return 0; |
2378 | } | 2374 | } |
@@ -2382,8 +2378,8 @@ static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) | |||
2382 | * Process 1 Process 2 | 2378 | * Process 1 Process 2 |
2383 | * ext3_create() quota_sync() | 2379 | * ext3_create() quota_sync() |
2384 | * journal_start() write_dquot() | 2380 | * journal_start() write_dquot() |
2385 | * DQUOT_INIT() down(dqio_sem) | 2381 | * DQUOT_INIT() down(dqio_mutex) |
2386 | * down(dqio_sem) journal_start() | 2382 | * down(dqio_mutex) journal_start() |
2387 | * | 2383 | * |
2388 | */ | 2384 | */ |
2389 | 2385 | ||