diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-27 23:23:27 +0100 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-27 23:23:27 +0100 |
commit | 5c676f6d359b0404d53f542f02e1359583cb2895 (patch) | |
tree | 8741011990ec0a3d0d41fee9f0d7abf6a16834cc /fs/gfs2/unlinked.c | |
parent | Merge branch 'master' (diff) | |
download | linux-5c676f6d359b0404d53f542f02e1359583cb2895.tar.xz 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/unlinked.c')
-rw-r--r-- | fs/gfs2/unlinked.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/gfs2/unlinked.c b/fs/gfs2/unlinked.c index e92a3a11815b..24b91c23bc2d 100644 --- a/fs/gfs2/unlinked.c +++ b/fs/gfs2/unlinked.c @@ -13,19 +13,23 @@ #include <linux/completion.h> #include <linux/buffer_head.h> #include <linux/kthread.h> +#include <linux/gfs2_ondisk.h> #include <asm/semaphore.h> #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "inode.h" #include "meta_io.h" #include "trans.h" #include "unlinked.h" +#include "util.h" static int munge_ondisk(struct gfs2_sbd *sdp, unsigned int slot, struct gfs2_unlinked_tag *ut) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_ut_inode); + struct gfs2_inode *ip = sdp->sd_ut_inode->u.generic_ip; unsigned int block, offset; uint64_t dblock; int new = 0; @@ -312,7 +316,7 @@ int gfs2_unlinked_dealloc(struct gfs2_sbd *sdp) int gfs2_unlinked_init(struct gfs2_sbd *sdp) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_ut_inode); + struct gfs2_inode *ip = sdp->sd_ut_inode->u.generic_ip; unsigned int blocks = ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; unsigned int x, slot = 0; unsigned int found = 0; @@ -327,7 +331,8 @@ int gfs2_unlinked_init(struct gfs2_sbd *sdp) return -EIO; } sdp->sd_unlinked_slots = blocks * sdp->sd_ut_per_block; - sdp->sd_unlinked_chunks = DIV_RU(sdp->sd_unlinked_slots, 8 * PAGE_SIZE); + sdp->sd_unlinked_chunks = DIV_ROUND_UP(sdp->sd_unlinked_slots, + 8 * PAGE_SIZE); error = -ENOMEM; |