aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r--fs/ext3/super.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index afc2d4f42d77..580b8a6ca979 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -436,7 +436,7 @@ static void ext3_put_super (struct super_block * sb)
436 return; 436 return;
437} 437}
438 438
439static kmem_cache_t *ext3_inode_cachep; 439static struct kmem_cache *ext3_inode_cachep;
440 440
441/* 441/*
442 * Called inside transaction, so use GFP_NOFS 442 * Called inside transaction, so use GFP_NOFS
@@ -445,7 +445,7 @@ static struct inode *ext3_alloc_inode(struct super_block *sb)
445{ 445{
446 struct ext3_inode_info *ei; 446 struct ext3_inode_info *ei;
447 447
448 ei = kmem_cache_alloc(ext3_inode_cachep, SLAB_NOFS); 448 ei = kmem_cache_alloc(ext3_inode_cachep, GFP_NOFS);
449 if (!ei) 449 if (!ei)
450 return NULL; 450 return NULL;
451#ifdef CONFIG_EXT3_FS_POSIX_ACL 451#ifdef CONFIG_EXT3_FS_POSIX_ACL
@@ -462,7 +462,7 @@ static void ext3_destroy_inode(struct inode *inode)
462 kmem_cache_free(ext3_inode_cachep, EXT3_I(inode)); 462 kmem_cache_free(ext3_inode_cachep, EXT3_I(inode));
463} 463}
464 464
465static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) 465static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
466{ 466{
467 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo; 467 struct ext3_inode_info *ei = (struct ext3_inode_info *) foo;
468 468
@@ -1264,6 +1264,12 @@ static void ext3_orphan_cleanup (struct super_block * sb,
1264 return; 1264 return;
1265 } 1265 }
1266 1266
1267 if (bdev_read_only(sb->s_bdev)) {
1268 printk(KERN_ERR "EXT3-fs: write access "
1269 "unavailable, skipping orphan cleanup.\n");
1270 return;
1271 }
1272
1267 if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) { 1273 if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
1268 if (es->s_last_orphan) 1274 if (es->s_last_orphan)
1269 jbd_debug(1, "Errors on filesystem, " 1275 jbd_debug(1, "Errors on filesystem, "
@@ -2387,6 +2393,7 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
2387 struct ext3_super_block *es = sbi->s_es; 2393 struct ext3_super_block *es = sbi->s_es;
2388 ext3_fsblk_t overhead; 2394 ext3_fsblk_t overhead;
2389 int i; 2395 int i;
2396 u64 fsid;
2390 2397
2391 if (test_opt (sb, MINIX_DF)) 2398 if (test_opt (sb, MINIX_DF))
2392 overhead = 0; 2399 overhead = 0;
@@ -2433,6 +2440,10 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
2433 buf->f_files = le32_to_cpu(es->s_inodes_count); 2440 buf->f_files = le32_to_cpu(es->s_inodes_count);
2434 buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter); 2441 buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter);
2435 buf->f_namelen = EXT3_NAME_LEN; 2442 buf->f_namelen = EXT3_NAME_LEN;
2443 fsid = le64_to_cpup((void *)es->s_uuid) ^
2444 le64_to_cpup((void *)es->s_uuid + sizeof(u64));
2445 buf->f_fsid.val[0] = fsid & 0xFFFFFFFFUL;
2446 buf->f_fsid.val[1] = (fsid >> 32) & 0xFFFFFFFFUL;
2436 return 0; 2447 return 0;
2437} 2448}
2438 2449