summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glock.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/glock.c
parentf3b270a47882b958e9e3c5bd86894e3a7072899a (diff)
downloadlinux-5c676f6d359b0404d53f542f02e1359583cb2895.tar.bz2
[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/glock.c')
-rw-r--r--fs/gfs2/glock.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index f30fde91d14a..81b06812b329 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -16,10 +16,13 @@
#include <linux/sort.h>
#include <linux/jhash.h>
#include <linux/kref.h>
+#include <linux/gfs2_ondisk.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>
#include "gfs2.h"
+#include "lm_interface.h"
+#include "incore.h"
#include "glock.h"
#include "glops.h"
#include "inode.h"
@@ -28,6 +31,7 @@
#include "meta_io.h"
#include "quota.h"
#include "super.h"
+#include "util.h"
/* Must be kept in sync with the beginning of struct gfs2_glock */
struct glock_plug {
@@ -1962,7 +1966,7 @@ void gfs2_try_toss_inode(struct gfs2_sbd *sdp, struct gfs2_inum *inum)
if (!gfs2_glmutex_trylock(gl))
goto out;
- ip = get_gl2ip(gl);
+ ip = gl->gl_object;
if (!ip)
goto out_unlock;
@@ -1994,7 +1998,7 @@ void gfs2_iopen_go_callback(struct gfs2_glock *io_gl, unsigned int state)
return;
spin_lock(&io_gl->gl_spin);
- i_gl = get_gl2gl(io_gl);
+ i_gl = io_gl->gl_object;
if (i_gl) {
gfs2_glock_hold(i_gl);
spin_unlock(&io_gl->gl_spin);
@@ -2004,7 +2008,7 @@ void gfs2_iopen_go_callback(struct gfs2_glock *io_gl, unsigned int state)
}
if (gfs2_glmutex_trylock(i_gl)) {
- struct gfs2_inode *ip = get_gl2ip(i_gl);
+ struct gfs2_inode *ip = i_gl->gl_object;
if (ip) {
gfs2_try_toss_vnode(ip);
gfs2_glmutex_unlock(i_gl);
@@ -2093,7 +2097,7 @@ void gfs2_reclaim_glock(struct gfs2_sbd *sdp)
if (gfs2_glmutex_trylock(gl)) {
if (gl->gl_ops == &gfs2_inode_glops) {
- struct gfs2_inode *ip = get_gl2ip(gl);
+ struct gfs2_inode *ip = gl->gl_object;
if (ip && !atomic_read(&ip->i_count))
gfs2_inode_destroy(ip);
}
@@ -2174,7 +2178,7 @@ static void scan_glock(struct gfs2_glock *gl)
{
if (gfs2_glmutex_trylock(gl)) {
if (gl->gl_ops == &gfs2_inode_glops) {
- struct gfs2_inode *ip = get_gl2ip(gl);
+ struct gfs2_inode *ip = gl->gl_object;
if (ip && !atomic_read(&ip->i_count))
goto out_schedule;
}
@@ -2234,7 +2238,7 @@ static void clear_glock(struct gfs2_glock *gl)
if (gfs2_glmutex_trylock(gl)) {
if (gl->gl_ops == &gfs2_inode_glops) {
- struct gfs2_inode *ip = get_gl2ip(gl);
+ struct gfs2_inode *ip = gl->gl_object;
if (ip && !atomic_read(&ip->i_count))
gfs2_inode_destroy(ip);
}
@@ -2430,10 +2434,10 @@ static int dump_glock(struct gfs2_glock *gl)
if (error)
goto out;
}
- if (gl->gl_ops == &gfs2_inode_glops && get_gl2ip(gl)) {
+ if (gl->gl_ops == &gfs2_inode_glops && gl->gl_object) {
if (!test_bit(GLF_LOCK, &gl->gl_flags) &&
list_empty(&gl->gl_holders)) {
- error = dump_inode(get_gl2ip(gl));
+ error = dump_inode(gl->gl_object);
if (error)
goto out;
} else {