aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b4b022aa2bc2..486a641ca71b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -486,7 +486,7 @@ static void ext4_put_super (struct super_block * sb)
486 return; 486 return;
487} 487}
488 488
489static kmem_cache_t *ext4_inode_cachep; 489static struct kmem_cache *ext4_inode_cachep;
490 490
491/* 491/*
492 * Called inside transaction, so use GFP_NOFS 492 * Called inside transaction, so use GFP_NOFS
@@ -495,7 +495,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
495{ 495{
496 struct ext4_inode_info *ei; 496 struct ext4_inode_info *ei;
497 497
498 ei = kmem_cache_alloc(ext4_inode_cachep, SLAB_NOFS); 498 ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
499 if (!ei) 499 if (!ei)
500 return NULL; 500 return NULL;
501#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 501#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
@@ -513,7 +513,7 @@ static void ext4_destroy_inode(struct inode *inode)
513 kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); 513 kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
514} 514}
515 515
516static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) 516static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
517{ 517{
518 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; 518 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
519 519
@@ -1321,6 +1321,12 @@ static void ext4_orphan_cleanup (struct super_block * sb,
1321 return; 1321 return;
1322 } 1322 }
1323 1323
1324 if (bdev_read_only(sb->s_bdev)) {
1325 printk(KERN_ERR "EXT4-fs: write access "
1326 "unavailable, skipping orphan cleanup.\n");
1327 return;
1328 }
1329
1324 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { 1330 if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
1325 if (es->s_last_orphan) 1331 if (es->s_last_orphan)
1326 jbd_debug(1, "Errors on filesystem, " 1332 jbd_debug(1, "Errors on filesystem, "
@@ -2460,6 +2466,7 @@ static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf)
2460 struct ext4_super_block *es = sbi->s_es; 2466 struct ext4_super_block *es = sbi->s_es;
2461 ext4_fsblk_t overhead; 2467 ext4_fsblk_t overhead;
2462 int i; 2468 int i;
2469 u64 fsid;
2463 2470
2464 if (test_opt (sb, MINIX_DF)) 2471 if (test_opt (sb, MINIX_DF))
2465 overhead = 0; 2472 overhead = 0;
@@ -2506,6 +2513,10 @@ static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf)
2506 buf->f_files = le32_to_cpu(es->s_inodes_count); 2513 buf->f_files = le32_to_cpu(es->s_inodes_count);
2507 buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter); 2514 buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter);
2508 buf->f_namelen = EXT4_NAME_LEN; 2515 buf->f_namelen = EXT4_NAME_LEN;
2516 fsid = le64_to_cpup((void *)es->s_uuid) ^
2517 le64_to_cpup((void *)es->s_uuid + sizeof(u64));
2518 buf->f_fsid.val[0] = fsid & 0xFFFFFFFFUL;
2519 buf->f_fsid.val[1] = (fsid >> 32) & 0xFFFFFFFFUL;
2509 return 0; 2520 return 0;
2510} 2521}
2511 2522