cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta
Date: Wed, 10 Jun 2009 11:43:59 +0100	[thread overview]
Message-ID: <1244630639.3355.10.camel@localhost.localdomain> (raw)
In-Reply-To: <20090610095319.GC25527@infradead.org>

From 003dec8913d6bebb4ecc989ec04a235cf38f5ea9 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Wed, 10 Jun 2009 10:31:45 +0100
Subject: [PATCH] GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta

These don't need to be separate functions.

Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 9da161c..f234aba 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1284,9 +1284,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 +1296,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);
-- 
1.6.0.6





  parent reply	other threads:[~2009-06-10 10:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10  8:30 [Cluster-devel] GFS2: Pre-pull patch posting Steven Whitehouse
2009-06-10  8:30 ` [Cluster-devel] [PATCH 01/24] GFS2: Update the rw flags Steven Whitehouse
2009-06-10  8:30   ` [Cluster-devel] [PATCH 02/24] GFS2: Optimise writepage for metadata Steven Whitehouse
2009-06-10  8:30     ` [Cluster-devel] [PATCH 03/24] GFS2: Something nonlinear this way comes! Steven Whitehouse
2009-06-10  8:30       ` [Cluster-devel] [PATCH 04/24] GFS2: Fix timestamps on write Steven Whitehouse
2009-06-10  8:30         ` [Cluster-devel] [PATCH 05/24] GFS2: Move journal live test at transaction start Steven Whitehouse
2009-06-10  8:30           ` [Cluster-devel] [PATCH 06/24] GFS2: Add commit= mount option Steven Whitehouse
2009-06-10  8:30             ` [Cluster-devel] [PATCH 07/24] GFS2: Remove a couple of unused sysfs entries Steven Whitehouse
2009-06-10  8:30               ` [Cluster-devel] [PATCH 08/24] GFS2: Umount recovery race fix Steven Whitehouse
2009-06-10  8:30                 ` [Cluster-devel] [PATCH 09/24] GFS2: Update docs Steven Whitehouse
2009-06-10  8:30                   ` [Cluster-devel] [PATCH 10/24] GFS2: Don't warn when delete inode fails on ro filesystem Steven Whitehouse
2009-06-10  8:30                     ` [Cluster-devel] [PATCH 11/24] GFS2: Improve resource group error handling Steven Whitehouse
2009-06-10  8:30                       ` [Cluster-devel] [PATCH 12/24] GFS2: Add a rgrp bitmap full flag Steven Whitehouse
2009-06-10  8:30                         ` [Cluster-devel] [PATCH 13/24] GFS2: Be more aggressive in reclaiming unlinked inodes Steven Whitehouse
2009-06-10  8:30                           ` [Cluster-devel] [PATCH 14/24] GFS2: Clean up some file names Steven Whitehouse
2009-06-10  8:30                             ` [Cluster-devel] [PATCH 15/24] GFS2: Merge mount.c and ops_super.c into super.c Steven Whitehouse
2009-06-10  8:30                               ` [Cluster-devel] [PATCH 16/24] GFS2: Move gfs2_rmdiri into ops_inode.c Steven Whitehouse
2009-06-10  8:30                                 ` [Cluster-devel] [PATCH 17/24] GFS2: Move gfs2_readlinki " Steven Whitehouse
2009-06-10  8:30                                   ` [Cluster-devel] [PATCH 18/24] GFS2: Move gfs2_unlink_ok " Steven Whitehouse
2009-06-10  8:31                                     ` [Cluster-devel] [PATCH 19/24] GFS2: Remove lockstruct subdir from gfs2 sysfs files Steven Whitehouse
2009-06-10  8:31                                       ` [Cluster-devel] [PATCH 20/24] GFS2: Remove args " Steven Whitehouse
2009-06-10  8:31                                         ` [Cluster-devel] [PATCH 21/24] GFS2: smbd proccess hangs with flock() call Steven Whitehouse
2009-06-10  8:31                                           ` [Cluster-devel] [PATCH 22/24] GFS2: Remove unused variable Steven Whitehouse
2009-06-10  8:31                                             ` [Cluster-devel] [PATCH 23/24] GFS2: Fix locking issue mounting gfs2meta fs Steven Whitehouse
2009-06-10  8:31                                               ` [Cluster-devel] [PATCH 24/24] GFS2: Fix cache coherency between truncate and O_DIRECT read Steven Whitehouse
2009-06-10  9:53                                               ` [Cluster-devel] Re: [PATCH 23/24] GFS2: Fix locking issue mounting gfs2meta fs Christoph Hellwig
2009-06-10 10:06                                                 ` Steven Whitehouse
2009-06-10 10:43                                                 ` Steven Whitehouse [this message]
2009-06-10  9:49                     ` [Cluster-devel] Re: [PATCH 10/24] GFS2: Don't warn when delete inode fails on ro filesystem Christoph Hellwig
2009-06-10 10:03                       ` Steven Whitehouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244630639.3355.10.camel@localhost.localdomain \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).