aboutsummaryrefslogtreecommitdiffstats
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)
[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 @@
12#include <linux/spinlock.h> 12#include <linux/spinlock.h>
13#include <linux/completion.h> 13#include <linux/completion.h>
14#include <linux/buffer_head.h> 14#include <linux/buffer_head.h>
15#include <linux/gfs2_ondisk.h>
15#include <asm/semaphore.h> 16#include <asm/semaphore.h>
16 17
17#include "gfs2.h" 18#include "gfs2.h"
19#include "lm_interface.h"
20#include "incore.h"
18#include "dir.h" 21#include "dir.h"
19#include "glock.h" 22#include "glock.h"
20#include "glops.h" 23#include "glops.h"
@@ -61,7 +64,7 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
61 int connectable) 64 int connectable)
62{ 65{
63 struct inode *inode = dentry->d_inode; 66 struct inode *inode = dentry->d_inode;
64 struct gfs2_inode *ip = get_v2ip(inode); 67 struct gfs2_inode *ip = inode->u.generic_ip;
65 struct gfs2_sbd *sdp = ip->i_sbd; 68 struct gfs2_sbd *sdp = ip->i_sbd;
66 69
67 if (*len < 4 || (connectable && *len < 8)) 70 if (*len < 4 || (connectable && *len < 8))
@@ -77,12 +80,12 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
77 fh[3] = cpu_to_be32(fh[3]); 80 fh[3] = cpu_to_be32(fh[3]);
78 *len = 4; 81 *len = 4;
79 82
80 if (!connectable || ip == get_v2ip(sdp->sd_root_dir)) 83 if (!connectable || ip == sdp->sd_root_dir->u.generic_ip)
81 return *len; 84 return *len;
82 85
83 spin_lock(&dentry->d_lock); 86 spin_lock(&dentry->d_lock);
84 inode = dentry->d_parent->d_inode; 87 inode = dentry->d_parent->d_inode;
85 ip = get_v2ip(inode); 88 ip = inode->u.generic_ip;
86 gfs2_inode_hold(ip); 89 gfs2_inode_hold(ip);
87 spin_unlock(&dentry->d_lock); 90 spin_unlock(&dentry->d_lock);
88 91
@@ -138,8 +141,8 @@ static int gfs2_get_name(struct dentry *parent, char *name,
138 if (!S_ISDIR(dir->i_mode) || !inode) 141 if (!S_ISDIR(dir->i_mode) || !inode)
139 return -EINVAL; 142 return -EINVAL;
140 143
141 dip = get_v2ip(dir); 144 dip = dir->u.generic_ip;
142 ip = get_v2ip(inode); 145 ip = inode->u.generic_ip;
143 146
144 *name = 0; 147 *name = 0;
145 gnfd.inum = ip->i_num; 148 gnfd.inum = ip->i_num;
@@ -181,7 +184,7 @@ static struct dentry *gfs2_get_parent(struct dentry *child)
181 184
182static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p) 185static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p)
183{ 186{
184 struct gfs2_sbd *sdp = get_v2sdp(sb); 187 struct gfs2_sbd *sdp = sb->s_fs_info;
185 struct gfs2_inum *inum = (struct gfs2_inum *)inum_p; 188 struct gfs2_inum *inum = (struct gfs2_inum *)inum_p;
186 struct gfs2_holder i_gh, ri_gh, rgd_gh; 189 struct gfs2_holder i_gh, ri_gh, rgd_gh;
187 struct gfs2_rgrpd *rgd; 190 struct gfs2_rgrpd *rgd;
@@ -194,7 +197,7 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p)
194 197
195 inode = gfs2_iget(sb, inum); 198 inode = gfs2_iget(sb, inum);
196 if (inode) { 199 if (inode) {
197 ip = get_v2ip(inode); 200 ip = inode->u.generic_ip;
198 if (ip->i_num.no_formal_ino != inum->no_formal_ino) { 201 if (ip->i_num.no_formal_ino != inum->no_formal_ino) {
199 iput(inode); 202 iput(inode);
200 return ERR_PTR(-ESTALE); 203 return ERR_PTR(-ESTALE);