ocfs2: Cleanup message prints
[firefly-linux-kernel-4.4.55.git] / fs / ocfs2 / super.c
index 788b8b50dc4c33e646e90bfbb2fade9f2f591ae1..4e214ecb588637165663b9e4dabc3349a5d2e46d 100644 (file)
@@ -100,7 +100,7 @@ static int ocfs2_initialize_mem_caches(void);
 static void ocfs2_free_mem_caches(void);
 static void ocfs2_delete_osb(struct ocfs2_super *osb);
 
-static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf);
+static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf);
 
 static int ocfs2_sync_fs(struct super_block *sb, int wait);
 
@@ -642,10 +642,9 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
 
        ocfs2_complete_mount_recovery(osb);
 
-       printk("ocfs2: Mounting device (%u,%u) on (node %d, slot %d) with %s "
-              "data mode.\n",
-              MAJOR(sb->s_dev), MINOR(sb->s_dev), osb->node_num,
-              osb->slot_num,
+       printk(KERN_INFO "ocfs2: Mounting device (%s) on (node %d, slot %d) "
+              "with %s data mode.\n",
+              osb->dev_str, osb->node_num, osb->slot_num,
               osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK ? "writeback" :
               "ordered");
 
@@ -857,7 +856,7 @@ static void ocfs2_put_super(struct super_block *sb)
        mlog_exit_void();
 }
 
-static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
+static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
        struct ocfs2_super *osb;
        u32 numbits, freebits;
@@ -866,9 +865,9 @@ static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
        struct buffer_head *bh = NULL;
        struct inode *inode = NULL;
 
-       mlog_entry("(%p, %p)\n", sb, buf);
+       mlog_entry("(%p, %p)\n", dentry->d_sb, buf);
 
-       osb = OCFS2_SB(sb);
+       osb = OCFS2_SB(dentry->d_sb);
 
        inode = ocfs2_get_system_file_inode(osb,
                                            GLOBAL_BITMAP_SYSTEM_INODE,
@@ -891,7 +890,7 @@ static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
        freebits = numbits - le32_to_cpu(bm_lock->id1.bitmap1.i_used);
 
        buf->f_type = OCFS2_SUPER_MAGIC;
-       buf->f_bsize = sb->s_blocksize;
+       buf->f_bsize = dentry->d_sb->s_blocksize;
        buf->f_namelen = OCFS2_MAX_FILENAME_LEN;
        buf->f_blocks = ((sector_t) numbits) *
                        (osb->s_clustersize >> osb->sb->s_blocksize_bits);
@@ -1020,7 +1019,7 @@ static int ocfs2_fill_local_node_info(struct ocfs2_super *osb)
                goto bail;
        }
 
-       mlog(ML_NOTICE, "I am node %d\n", osb->node_num);
+       mlog(0, "I am node %d\n", osb->node_num);
 
        status = 0;
 bail:
@@ -1191,8 +1190,8 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
 
        atomic_set(&osb->vol_state, VOLUME_DISMOUNTED);
 
-       printk("ocfs2: Unmounting device (%u,%u) on (node %d)\n",
-              MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev), osb->node_num);
+       printk(KERN_INFO "ocfs2: Unmounting device (%s) on (node %d)\n",
+              osb->dev_str, osb->node_num);
 
        ocfs2_delete_osb(osb);
        kfree(osb);
@@ -1327,7 +1326,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
                status = -EINVAL;
                goto bail;
        }
-       mlog(ML_NOTICE, "max_slots for this device: %u\n", osb->max_slots);
+       mlog(0, "max_slots for this device: %u\n", osb->max_slots);
 
        init_waitqueue_head(&osb->osb_wipe_event);
        osb->osb_orphan_wipes = kcalloc(osb->max_slots,