aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2008-11-22 15:04:59 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-22 15:04:59 -0500
commit3a06d778dfeda7eaeeb79bfa49cf97f2aae132b4 (patch)
tree08c813063950404356c9c64678eed72f21f217b9 /fs/ext4/super.c
parent1a0d3786dd57dbd74f340322054c3d618b999dcf (diff)
ext4: sparse fixes
* Change EXT4_HAS_*_FEATURE to return a boolean * Add a function prototype for ext4_fiemap() in ext4.h * Make ext4_ext_fiemap_cb() and ext4_xattr_fiemap() be static functions * Add lock annotations to mb_free_blocks() Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 8fa57be5040a..a9dd1170bfea 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1924,7 +1924,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
1924 int db_count; 1924 int db_count;
1925 int i; 1925 int i;
1926 int needs_recovery, has_huge_files; 1926 int needs_recovery, has_huge_files;
1927 __le32 features; 1927 int features;
1928 __u64 blocks_count; 1928 __u64 blocks_count;
1929 int err; 1929 int err;
1930 1930
@@ -2056,15 +2056,17 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
2056 features = EXT4_HAS_INCOMPAT_FEATURE(sb, ~EXT4_FEATURE_INCOMPAT_SUPP); 2056 features = EXT4_HAS_INCOMPAT_FEATURE(sb, ~EXT4_FEATURE_INCOMPAT_SUPP);
2057 if (features) { 2057 if (features) {
2058 printk(KERN_ERR "EXT4-fs: %s: couldn't mount because of " 2058 printk(KERN_ERR "EXT4-fs: %s: couldn't mount because of "
2059 "unsupported optional features (%x).\n", 2059 "unsupported optional features (%x).\n", sb->s_id,
2060 sb->s_id, le32_to_cpu(features)); 2060 (le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_incompat) &
2061 ~EXT4_FEATURE_INCOMPAT_SUPP));
2061 goto failed_mount; 2062 goto failed_mount;
2062 } 2063 }
2063 features = EXT4_HAS_RO_COMPAT_FEATURE(sb, ~EXT4_FEATURE_RO_COMPAT_SUPP); 2064 features = EXT4_HAS_RO_COMPAT_FEATURE(sb, ~EXT4_FEATURE_RO_COMPAT_SUPP);
2064 if (!(sb->s_flags & MS_RDONLY) && features) { 2065 if (!(sb->s_flags & MS_RDONLY) && features) {
2065 printk(KERN_ERR "EXT4-fs: %s: couldn't mount RDWR because of " 2066 printk(KERN_ERR "EXT4-fs: %s: couldn't mount RDWR because of "
2066 "unsupported optional features (%x).\n", 2067 "unsupported optional features (%x).\n", sb->s_id,
2067 sb->s_id, le32_to_cpu(features)); 2068 (le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_ro_compat) &
2069 ~EXT4_FEATURE_RO_COMPAT_SUPP));
2068 goto failed_mount; 2070 goto failed_mount;
2069 } 2071 }
2070 has_huge_files = EXT4_HAS_RO_COMPAT_FEATURE(sb, 2072 has_huge_files = EXT4_HAS_RO_COMPAT_FEATURE(sb,
@@ -3131,13 +3133,14 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
3131 lock_super(sb); 3133 lock_super(sb);
3132 } 3134 }
3133 } else { 3135 } else {
3134 __le32 ret; 3136 int ret;
3135 if ((ret = EXT4_HAS_RO_COMPAT_FEATURE(sb, 3137 if ((ret = EXT4_HAS_RO_COMPAT_FEATURE(sb,
3136 ~EXT4_FEATURE_RO_COMPAT_SUPP))) { 3138 ~EXT4_FEATURE_RO_COMPAT_SUPP))) {
3137 printk(KERN_WARNING "EXT4-fs: %s: couldn't " 3139 printk(KERN_WARNING "EXT4-fs: %s: couldn't "
3138 "remount RDWR because of unsupported " 3140 "remount RDWR because of unsupported "
3139 "optional features (%x).\n", 3141 "optional features (%x).\n", sb->s_id,
3140 sb->s_id, le32_to_cpu(ret)); 3142 (le32_to_cpu(sbi->s_es->s_feature_ro_compat) &
3143 ~EXT4_FEATURE_RO_COMPAT_SUPP));
3141 err = -EROFS; 3144 err = -EROFS;
3142 goto restore_opts; 3145 goto restore_opts;
3143 } 3146 }