SPARC: fix duplicate declaration
[safe/jmp/linux-2.6] / fs / gfs2 / ops_fstype.c
index 9da161c..7bc3c45 100644 (file)
@@ -33,6 +33,7 @@
 #include "log.h"
 #include "quota.h"
 #include "dir.h"
+#include "trace_gfs2.h"
 
 #define DO 0
 #define UNDO 1
@@ -525,11 +526,11 @@ static int init_sb(struct gfs2_sbd *sdp, int silent)
        }
 
        /* Set up the buffer cache and SB for real */
-       if (sdp->sd_sb.sb_bsize < bdev_hardsect_size(sb->s_bdev)) {
+       if (sdp->sd_sb.sb_bsize < bdev_logical_block_size(sb->s_bdev)) {
                ret = -EINVAL;
                fs_err(sdp, "FS block size (%u) is too small for device "
                       "block size (%u)\n",
-                      sdp->sd_sb.sb_bsize, bdev_hardsect_size(sb->s_bdev));
+                      sdp->sd_sb.sb_bsize, bdev_logical_block_size(sb->s_bdev));
                goto out;
        }
        if (sdp->sd_sb.sb_bsize > PAGE_SIZE) {
@@ -775,6 +776,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
                /* Map the extents for this journal's blocks */
                map_journal_extents(sdp);
        }
+       trace_gfs2_log_blocks(sdp, atomic_read(&sdp->sd_log_blks_free));
 
        if (sdp->sd_lockstruct.ls_first) {
                unsigned int x;
@@ -1284,9 +1286,11 @@ static int set_meta_super(struct super_block *s, void *ptr)
        return -EINVAL;
 }
 
-static struct super_block *get_gfs2_sb(const char *dev_name)
+static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags,
+                           const char *dev_name, void *data, struct vfsmount *mnt)
 {
        struct super_block *s;
+       struct gfs2_sbd *sdp;
        struct path path;
        int error;
 
@@ -1294,21 +1298,11 @@ static struct super_block *get_gfs2_sb(const char *dev_name)
        if (error) {
                printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n",
                       dev_name, error);
-               return ERR_PTR(-ENOENT);
+               return error;
        }
        s = sget(&gfs2_fs_type, test_meta_super, set_meta_super,
                 path.dentry->d_inode->i_sb->s_bdev);
        path_put(&path);
-       return s;
-}
-
-static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags,
-                           const char *dev_name, void *data, struct vfsmount *mnt)
-{
-       struct super_block *s;
-       struct gfs2_sbd *sdp;
-
-       s = get_gfs2_sb(dev_name);
        if (IS_ERR(s)) {
                printk(KERN_WARNING "GFS2: gfs2 mount does not exist\n");
                return PTR_ERR(s);