aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-02-27 17:23:27 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-02-27 17:23:27 -0500
commit5c676f6d359b0404d53f542f02e1359583cb2895 (patch)
tree8741011990ec0a3d0d41fee9f0d7abf6a16834cc /fs/gfs2/ops_super.c
parentf3b270a47882b958e9e3c5bd86894e3a7072899a (diff)
downloadlinux-5c676f6d359b0404d53f542f02e1359583cb2895.tar.gz
[GFS2] Macros removal in gfs2.h
As suggested by Pekka Enberg <penberg@cs.helsinki.fi>. The DIV_RU macro is renamed DIV_ROUND_UP and and moved to kernel.h The other macros are gone from gfs2.h as (although not requested by Pekka Enberg) are a number of included header file which are now included individually. The inode number comparison function is now an inline function. The DT2IF and IF2DT may be addressed in a future patch. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r--fs/gfs2/ops_super.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 48a94522406ea5..10f70ee121613b 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -18,9 +18,12 @@
#include <linux/mount.h>
#include <linux/kthread.h>
#include <linux/delay.h>
+#include <linux/gfs2_ondisk.h>
#include <asm/semaphore.h>
#include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
#include "glock.h"
#include "inode.h"
#include "lm.h"
@@ -33,6 +36,7 @@
#include "rgrp.h"
#include "super.h"
#include "sys.h"
+#include "util.h"
/**
* gfs2_write_inode - Make sure the inode is stable on the disk
@@ -44,7 +48,7 @@
static int gfs2_write_inode(struct inode *inode, int sync)
{
- struct gfs2_inode *ip = get_v2ip(inode);
+ struct gfs2_inode *ip = inode->u.generic_ip;
if (current->flags & PF_MEMALLOC)
return 0;
@@ -62,7 +66,7 @@ static int gfs2_write_inode(struct inode *inode, int sync)
static void gfs2_put_super(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
if (!sdp)
@@ -138,7 +142,7 @@ static void gfs2_put_super(struct super_block *sb)
vfree(sdp);
- set_v2sdp(sb, NULL);
+ sb->s_fs_info = NULL;
}
/**
@@ -151,7 +155,7 @@ static void gfs2_put_super(struct super_block *sb)
static void gfs2_write_super(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
gfs2_log_flush(sdp);
}
@@ -163,7 +167,7 @@ static void gfs2_write_super(struct super_block *sb)
static void gfs2_write_super_lockfs(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
for (;;) {
@@ -194,7 +198,7 @@ static void gfs2_write_super_lockfs(struct super_block *sb)
static void gfs2_unlockfs(struct super_block *sb)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
gfs2_unfreeze_fs(sdp);
}
@@ -208,7 +212,7 @@ static void gfs2_unlockfs(struct super_block *sb)
static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
struct gfs2_statfs_change sc;
int error;
@@ -245,7 +249,7 @@ static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf)
static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
error = gfs2_mount_args(sdp, data, 1);
@@ -283,12 +287,12 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
static void gfs2_clear_inode(struct inode *inode)
{
- struct gfs2_inode *ip = get_v2ip(inode);
+ struct gfs2_inode *ip = inode->u.generic_ip;
if (ip) {
spin_lock(&ip->i_spin);
ip->i_vnode = NULL;
- set_v2ip(inode, NULL);
+ inode->u.generic_ip = NULL;
spin_unlock(&ip->i_spin);
gfs2_glock_schedule_for_reclaim(ip->i_gl);
@@ -306,7 +310,7 @@ static void gfs2_clear_inode(struct inode *inode)
static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
{
- struct gfs2_sbd *sdp = get_v2sdp(mnt->mnt_sb);
+ struct gfs2_sbd *sdp = mnt->mnt_sb->s_fs_info;
struct gfs2_args *args = &sdp->sd_args;
if (args->ar_lockproto[0])