aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-01-05 21:25:51 -0500
committerChris Mason <chris.mason@oracle.com>2009-01-05 21:25:51 -0500
commitd397712bcc6a759a560fd247e6053ecae091f958 (patch)
tree9da8daebb870d8b8b1843507c4621715e23dd31a /fs/btrfs/super.c
parent1f3c79a28c8837e8572b98f6d14142d9a6133c56 (diff)
Btrfs: Fix checkpatch.pl warnings
There were many, most are fixed now. struct-funcs.c generates some warnings but these are bogus. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index ccdcb7bb7ad8..b4c101d9322c 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -55,18 +55,12 @@
55 55
56static struct super_operations btrfs_super_ops; 56static struct super_operations btrfs_super_ops;
57 57
58static void btrfs_put_super (struct super_block * sb) 58static void btrfs_put_super(struct super_block *sb)
59{ 59{
60 struct btrfs_root *root = btrfs_sb(sb); 60 struct btrfs_root *root = btrfs_sb(sb);
61 int ret; 61 int ret;
62 62
63 ret = close_ctree(root); 63 ret = close_ctree(root);
64 if (ret) {
65 printk("close ctree returns %d\n", ret);
66 }
67#if 0
68 btrfs_sysfs_del_super(root->fs_info);
69#endif
70 sb->s_fs_info = NULL; 64 sb->s_fs_info = NULL;
71} 65}
72 66
@@ -299,12 +293,12 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
299 return error; 293 return error;
300} 294}
301 295
302static int btrfs_fill_super(struct super_block * sb, 296static int btrfs_fill_super(struct super_block *sb,
303 struct btrfs_fs_devices *fs_devices, 297 struct btrfs_fs_devices *fs_devices,
304 void * data, int silent) 298 void *data, int silent)
305{ 299{
306 struct inode * inode; 300 struct inode *inode;
307 struct dentry * root_dentry; 301 struct dentry *root_dentry;
308 struct btrfs_super_block *disk_super; 302 struct btrfs_super_block *disk_super;
309 struct btrfs_root *tree_root; 303 struct btrfs_root *tree_root;
310 struct btrfs_inode *bi; 304 struct btrfs_inode *bi;
@@ -479,8 +473,10 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
479 root = dget(s->s_root); 473 root = dget(s->s_root);
480 else { 474 else {
481 mutex_lock(&s->s_root->d_inode->i_mutex); 475 mutex_lock(&s->s_root->d_inode->i_mutex);
482 root = lookup_one_len(subvol_name, s->s_root, strlen(subvol_name)); 476 root = lookup_one_len(subvol_name, s->s_root,
477 strlen(subvol_name));
483 mutex_unlock(&s->s_root->d_inode->i_mutex); 478 mutex_unlock(&s->s_root->d_inode->i_mutex);
479
484 if (IS_ERR(root)) { 480 if (IS_ERR(root)) {
485 up_write(&s->s_umount); 481 up_write(&s->s_umount);
486 deactivate_super(s); 482 deactivate_super(s);
@@ -557,8 +553,9 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
557 buf->f_bavail = buf->f_bfree; 553 buf->f_bavail = buf->f_bfree;
558 buf->f_bsize = dentry->d_sb->s_blocksize; 554 buf->f_bsize = dentry->d_sb->s_blocksize;
559 buf->f_type = BTRFS_SUPER_MAGIC; 555 buf->f_type = BTRFS_SUPER_MAGIC;
556
560 /* We treat it as constant endianness (it doesn't matter _which_) 557 /* We treat it as constant endianness (it doesn't matter _which_)
561 because we want the fsid to come out the same whether mounted 558 because we want the fsid to come out the same whether mounted
562 on a big-endian or little-endian host */ 559 on a big-endian or little-endian host */
563 buf->f_fsid.val[0] = be32_to_cpu(fsid[0]) ^ be32_to_cpu(fsid[2]); 560 buf->f_fsid.val[0] = be32_to_cpu(fsid[0]) ^ be32_to_cpu(fsid[2]);
564 buf->f_fsid.val[1] = be32_to_cpu(fsid[1]) ^ be32_to_cpu(fsid[3]); 561 buf->f_fsid.val[1] = be32_to_cpu(fsid[1]) ^ be32_to_cpu(fsid[3]);
@@ -658,7 +655,7 @@ static int btrfs_interface_init(void)
658static void btrfs_interface_exit(void) 655static void btrfs_interface_exit(void)
659{ 656{
660 if (misc_deregister(&btrfs_misc) < 0) 657 if (misc_deregister(&btrfs_misc) < 0)
661 printk("misc_deregister failed for control device"); 658 printk(KERN_INFO "misc_deregister failed for control device");
662} 659}
663 660
664static int __init init_btrfs_fs(void) 661static int __init init_btrfs_fs(void)