summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_export.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_export.c
parentf3b270a47882b958e9e3c5bd86894e3a7072899a (diff)
downloadlinux-5c676f6d359b0404d53f542f02e1359583cb2895.tar.gz
linux-5c676f6d359b0404d53f542f02e1359583cb2895.tar.bz2
linux-5c676f6d359b0404d53f542f02e1359583cb2895.zip
[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_export.c')
-rw-r--r--fs/gfs2/ops_export.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c
index 60d006402553..d149584cff30 100644
--- a/fs/gfs2/ops_export.c
+++ b/fs/gfs2/ops_export.c
@@ -12,9 +12,12 @@
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
+#include <linux/gfs2_ondisk.h>
#include <asm/semaphore.h>
#include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
#include "dir.h"
#include "glock.h"
#include "glops.h"
@@ -61,7 +64,7 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
int connectable)
{
struct inode *inode = dentry->d_inode;
- struct gfs2_inode *ip = get_v2ip(inode);
+ struct gfs2_inode *ip = inode->u.generic_ip;
struct gfs2_sbd *sdp = ip->i_sbd;
if (*len < 4 || (connectable && *len < 8))
@@ -77,12 +80,12 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
fh[3] = cpu_to_be32(fh[3]);
*len = 4;
- if (!connectable || ip == get_v2ip(sdp->sd_root_dir))
+ if (!connectable || ip == sdp->sd_root_dir->u.generic_ip)
return *len;
spin_lock(&dentry->d_lock);
inode = dentry->d_parent->d_inode;
- ip = get_v2ip(inode);
+ ip = inode->u.generic_ip;
gfs2_inode_hold(ip);
spin_unlock(&dentry->d_lock);
@@ -138,8 +141,8 @@ static int gfs2_get_name(struct dentry *parent, char *name,
if (!S_ISDIR(dir->i_mode) || !inode)
return -EINVAL;
- dip = get_v2ip(dir);
- ip = get_v2ip(inode);
+ dip = dir->u.generic_ip;
+ ip = inode->u.generic_ip;
*name = 0;
gnfd.inum = ip->i_num;
@@ -181,7 +184,7 @@ static struct dentry *gfs2_get_parent(struct dentry *child)
static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p)
{
- struct gfs2_sbd *sdp = get_v2sdp(sb);
+ struct gfs2_sbd *sdp = sb->s_fs_info;
struct gfs2_inum *inum = (struct gfs2_inum *)inum_p;
struct gfs2_holder i_gh, ri_gh, rgd_gh;
struct gfs2_rgrpd *rgd;
@@ -194,7 +197,7 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p)
inode = gfs2_iget(sb, inum);
if (inode) {
- ip = get_v2ip(inode);
+ ip = inode->u.generic_ip;
if (ip->i_num.no_formal_ino != inum->no_formal_ino) {
iput(inode);
return ERR_PTR(-ESTALE);