ocfs2: Remove EXIT from masklog.
[deliverable/linux.git] / fs / ocfs2 / super.c
index 38f986d2447ea9ba0c7a657b0500c421bf2abbaa..b21b702c5603f2f78c7c56dd967026e1fd9496b1 100644 (file)
@@ -441,8 +441,6 @@ static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)
        int status = 0;
        int i;
 
-       mlog_entry_void();
-
        new = ocfs2_iget(osb, osb->root_blkno, OCFS2_FI_FLAG_SYSFILE, 0);
        if (IS_ERR(new)) {
                status = PTR_ERR(new);
@@ -478,7 +476,8 @@ static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb)
        }
 
 bail:
-       mlog_exit(status);
+       if (status)
+               mlog_errno(status);
        return status;
 }
 
@@ -488,8 +487,6 @@ static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb)
        int status = 0;
        int i;
 
-       mlog_entry_void();
-
        for (i = OCFS2_LAST_GLOBAL_SYSTEM_INODE + 1;
             i < NUM_SYSTEM_INODES;
             i++) {
@@ -508,7 +505,8 @@ static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb)
        }
 
 bail:
-       mlog_exit(status);
+       if (status)
+               mlog_errno(status);
        return status;
 }
 
@@ -517,8 +515,6 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb)
        int i;
        struct inode *inode;
 
-       mlog_entry_void();
-
        for (i = 0; i < NUM_GLOBAL_SYSTEM_INODES; i++) {
                inode = osb->global_system_inodes[i];
                if (inode) {
@@ -540,7 +536,7 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb)
        }
 
        if (!osb->local_system_inodes)
-               goto out;
+               return;
 
        for (i = 0; i < NUM_LOCAL_SYSTEM_INODES * osb->max_slots; i++) {
                if (osb->local_system_inodes[i]) {
@@ -551,9 +547,6 @@ static void ocfs2_release_system_inodes(struct ocfs2_super *osb)
 
        kfree(osb->local_system_inodes);
        osb->local_system_inodes = NULL;
-
-out:
-       mlog_exit(0);
 }
 
 /* We're allocating fs objects, use GFP_NOFS */
@@ -1032,7 +1025,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
        char nodestr[8];
        struct ocfs2_blockcheck_stats stats;
 
-       mlog_entry("%p, %p, %i", sb, data, silent);
+       mlog(0, "%p, %p, %i", sb, data, silent);
 
        if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) {
                status = -EINVAL;
@@ -1208,7 +1201,6 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
                        mlog_errno(status);
                        atomic_set(&osb->vol_state, VOLUME_DISABLED);
                        wake_up(&osb->osb_mount_event);
-                       mlog_exit(status);
                        return status;
                }
        }
@@ -1222,7 +1214,6 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
        /* Start this when the mount is almost sure of being successful */
        ocfs2_orphan_scan_start(osb);
 
-       mlog_exit(status);
        return status;
 
 read_super_error:
@@ -1237,7 +1228,8 @@ read_super_error:
                ocfs2_dismount_volume(sb, 1);
        }
 
-       mlog_exit(status);
+       if (status)
+               mlog_errno(status);
        return status;
 }
 
@@ -1316,12 +1308,12 @@ static int ocfs2_parse_options(struct super_block *sb,
                               struct mount_options *mopt,
                               int is_remount)
 {
-       int status;
+       int status, user_stack = 0;
        char *p;
        u32 tmp;
 
-       mlog_entry("remount: %d, options: \"%s\"\n", is_remount,
-                  options ? options : "(none)");
+       mlog(0, "remount: %d, options: \"%s\"\n", is_remount,
+            options ? options : "(none)");
 
        mopt->commit_interval = 0;
        mopt->mount_opt = OCFS2_MOUNT_NOINTR;
@@ -1459,6 +1451,15 @@ static int ocfs2_parse_options(struct super_block *sb,
                        memcpy(mopt->cluster_stack, args[0].from,
                               OCFS2_STACK_LABEL_LEN);
                        mopt->cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0';
+                       /*
+                        * Open code the memcmp here as we don't have
+                        * an osb to pass to
+                        * ocfs2_userspace_stack().
+                        */
+                       if (memcmp(mopt->cluster_stack,
+                                  OCFS2_CLASSIC_CLUSTER_STACK,
+                                  OCFS2_STACK_LABEL_LEN))
+                               user_stack = 1;
                        break;
                case Opt_inode64:
                        mopt->mount_opt |= OCFS2_MOUNT_INODE64;
@@ -1514,19 +1515,21 @@ static int ocfs2_parse_options(struct super_block *sb,
                }
        }
 
-       /* Ensure only one heartbeat mode */
-       tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL | OCFS2_MOUNT_HB_GLOBAL |
-                                OCFS2_MOUNT_HB_NONE);
-       if (hweight32(tmp) != 1) {
-               mlog(ML_ERROR, "Invalid heartbeat mount options\n");
-               status = 0;
-               goto bail;
+       if (user_stack == 0) {
+               /* Ensure only one heartbeat mode */
+               tmp = mopt->mount_opt & (OCFS2_MOUNT_HB_LOCAL |
+                                        OCFS2_MOUNT_HB_GLOBAL |
+                                        OCFS2_MOUNT_HB_NONE);
+               if (hweight32(tmp) != 1) {
+                       mlog(ML_ERROR, "Invalid heartbeat mount options\n");
+                       status = 0;
+                       goto bail;
+               }
        }
 
        status = 1;
 
 bail:
-       mlog_exit(status);
        return status;
 }
 
@@ -1617,8 +1620,6 @@ static int __init ocfs2_init(void)
 {
        int status;
 
-       mlog_entry_void();
-
        ocfs2_print_version();
 
        status = init_ocfs2_uptodate_cache();
@@ -1657,10 +1658,9 @@ leave:
                ocfs2_quota_shutdown();
                ocfs2_free_mem_caches();
                exit_ocfs2_uptodate_cache();
+               mlog_errno(status);
        }
 
-       mlog_exit(status);
-
        if (status >= 0) {
                return register_filesystem(&ocfs2_fs_type);
        } else
@@ -1669,8 +1669,6 @@ leave:
 
 static void __exit ocfs2_exit(void)
 {
-       mlog_entry_void();
-
        ocfs2_quota_shutdown();
 
        if (ocfs2_wq) {
@@ -1687,18 +1685,14 @@ static void __exit ocfs2_exit(void)
        unregister_filesystem(&ocfs2_fs_type);
 
        exit_ocfs2_uptodate_cache();
-
-       mlog_exit_void();
 }
 
 static void ocfs2_put_super(struct super_block *sb)
 {
-       mlog_entry("(0x%p)\n", sb);
+       mlog(0, "(0x%p)\n", sb);
 
        ocfs2_sync_blockdev(sb);
        ocfs2_dismount_volume(sb, 0);
-
-       mlog_exit_void();
 }
 
 static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -1710,7 +1704,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
        struct buffer_head *bh = NULL;
        struct inode *inode = NULL;
 
-       mlog_entry("(%p, %p)\n", dentry->d_sb, buf);
+       mlog(0, "(%p, %p)\n", dentry->d_sb, buf);
 
        osb = OCFS2_SB(dentry->d_sb);
 
@@ -1757,7 +1751,8 @@ bail:
        if (inode)
                iput(inode);
 
-       mlog_exit(status);
+       if (status)
+               mlog_errno(status);
 
        return status;
 }
@@ -1877,8 +1872,6 @@ static int ocfs2_mount_volume(struct super_block *sb)
        int unlock_super = 0;
        struct ocfs2_super *osb = OCFS2_SB(sb);
 
-       mlog_entry_void();
-
        if (ocfs2_is_hard_readonly(osb))
                goto leave;
 
@@ -1923,7 +1916,6 @@ leave:
        if (unlock_super)
                ocfs2_super_unlock(osb, 1);
 
-       mlog_exit(status);
        return status;
 }
 
@@ -1933,7 +1925,7 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
        struct ocfs2_super *osb = NULL;
        char nodestr[8];
 
-       mlog_entry("(0x%p)\n", sb);
+       mlog(0, "(0x%p)\n", sb);
 
        BUG_ON(!sb);
        osb = OCFS2_SB(sb);
@@ -2085,8 +2077,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
        struct ocfs2_super *osb;
        u64 total_blocks;
 
-       mlog_entry_void();
-
        osb = kzalloc(sizeof(struct ocfs2_super), GFP_KERNEL);
        if (!osb) {
                status = -ENOMEM;
@@ -2375,7 +2365,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
        }
 
 bail:
-       mlog_exit(status);
        return status;
 }
 
@@ -2391,8 +2380,6 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di,
 {
        int status = -EAGAIN;
 
-       mlog_entry_void();
-
        if (memcmp(di->i_signature, OCFS2_SUPER_BLOCK_SIGNATURE,
                   strlen(OCFS2_SUPER_BLOCK_SIGNATURE)) == 0) {
                /* We have to do a raw check of the feature here */
@@ -2447,7 +2434,8 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di,
        }
 
 out:
-       mlog_exit(status);
+       if (status && status != -EAGAIN)
+               mlog_errno(status);
        return status;
 }
 
@@ -2460,8 +2448,6 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)
                                                  * recover
                                                  * ourselves. */
 
-       mlog_entry_void();
-
        /* Init our journal object. */
        status = ocfs2_journal_init(osb->journal, &dirty);
        if (status < 0) {
@@ -2544,7 +2530,8 @@ finally:
        if (local_alloc)
                kfree(local_alloc);
 
-       mlog_exit(status);
+       if (status)
+               mlog_errno(status);
        return status;
 }
 
@@ -2556,8 +2543,6 @@ finally:
  */
 static void ocfs2_delete_osb(struct ocfs2_super *osb)
 {
-       mlog_entry_void();
-
        /* This function assumes that the caller has the main osb resource */
 
        ocfs2_free_slot_info(osb);
@@ -2575,8 +2560,6 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb)
        kfree(osb->uuid_str);
        ocfs2_put_dlm_debug(osb->osb_dlm_debug);
        memset(osb, 0, sizeof(struct ocfs2_super));
-
-       mlog_exit_void();
 }
 
 /* Put OCFS2 into a readonly state, or (if the user specifies it),
This page took 0.027297 seconds and 5 git commands to generate.