X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Faffs%2Fsuper.c;h=4d7e5b19e5cd20b99d76de5e53743dd9836704de;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=f4ebbd27ef1bf4e1931147b7d1c183b8e33d1171;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/fs/affs/super.c b/fs/affs/super.c index f4ebbd27e..4d7e5b19e 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -11,26 +11,10 @@ */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include +#include #include -#include -#include +#include "affs.h" extern struct timezone sys_tz; @@ -44,15 +28,14 @@ affs_put_super(struct super_block *sb) pr_debug("AFFS: put_super()\n"); if (!(sb->s_flags & MS_RDONLY)) { - AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag = be32_to_cpu(1); + AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag = cpu_to_be32(1); secs_to_datestamp(get_seconds(), &AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->disk_change); affs_fix_checksum(sb, sbi->s_root_bh); mark_buffer_dirty(sbi->s_root_bh); } - if (sbi->s_prefix) - kfree(sbi->s_prefix); + kfree(sbi->s_prefix); affs_free_bitmap(sb); affs_brelse(sbi->s_root_bh); kfree(sbi); @@ -70,7 +53,7 @@ affs_write_super(struct super_block *sb) // if (sbi->s_bitmap[i].bm_bh) { // if (buffer_dirty(sbi->s_bitmap[i].bm_bh)) { // clean = 0; - AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag = be32_to_cpu(clean); + AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag = cpu_to_be32(clean); secs_to_datestamp(get_seconds(), &AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->disk_change); affs_fix_checksum(sb, sbi->s_root_bh); @@ -115,7 +98,8 @@ static int init_inodecache(void) { affs_inode_cachep = kmem_cache_create("affs_inode_cache", sizeof(struct affs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + 0, (SLAB_RECLAIM_ACCOUNT| + SLAB_MEM_SPREAD), init_once, NULL); if (affs_inode_cachep == NULL) return -ENOMEM; @@ -214,10 +198,9 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s *mount_opts |= SF_MUFS; break; case Opt_prefix: - if (*prefix) { /* Free any previous prefix */ - kfree(*prefix); - *prefix = NULL; - } + /* Free any previous prefix */ + kfree(*prefix); + *prefix = NULL; *prefix = match_strdup(&args[0]); if (!*prefix) return 0; @@ -387,7 +370,7 @@ got_root: printk(KERN_ERR "AFFS: Cannot read boot block\n"); goto out_error; } - chksum = be32_to_cpu(*(u32 *)boot_bh->b_data); + chksum = be32_to_cpu(*(__be32 *)boot_bh->b_data); brelse(boot_bh); /* Dircache filesystems are compatible with non-dircache ones @@ -478,11 +461,9 @@ got_root: out_error: if (root_inode) iput(root_inode); - if (sbi->s_bitmap) - kfree(sbi->s_bitmap); + kfree(sbi->s_bitmap); affs_brelse(root_bh); - if (sbi->s_prefix) - kfree(sbi->s_prefix); + kfree(sbi->s_prefix); kfree(sbi); sb->s_fs_info = NULL; return -EINVAL;