diff options
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 56683788a6cf..37f70ca558cc 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -59,9 +59,12 @@ | |||
59 | #include <linux/completion.h> | 59 | #include <linux/completion.h> |
60 | #include <linux/buffer_head.h> | 60 | #include <linux/buffer_head.h> |
61 | #include <linux/sort.h> | 61 | #include <linux/sort.h> |
62 | #include <linux/gfs2_ondisk.h> | ||
62 | #include <asm/semaphore.h> | 63 | #include <asm/semaphore.h> |
63 | 64 | ||
64 | #include "gfs2.h" | 65 | #include "gfs2.h" |
66 | #include "lm_interface.h" | ||
67 | #include "incore.h" | ||
65 | #include "dir.h" | 68 | #include "dir.h" |
66 | #include "glock.h" | 69 | #include "glock.h" |
67 | #include "inode.h" | 70 | #include "inode.h" |
@@ -70,6 +73,7 @@ | |||
70 | #include "rgrp.h" | 73 | #include "rgrp.h" |
71 | #include "trans.h" | 74 | #include "trans.h" |
72 | #include "bmap.h" | 75 | #include "bmap.h" |
76 | #include "util.h" | ||
73 | 77 | ||
74 | #define IS_LEAF 1 /* Hashed (leaf) directory */ | 78 | #define IS_LEAF 1 /* Hashed (leaf) directory */ |
75 | #define IS_DINODE 2 /* Linear (stuffed dinode block) directory */ | 79 | #define IS_DINODE 2 /* Linear (stuffed dinode block) directory */ |
@@ -2196,7 +2200,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, | |||
2196 | 2200 | ||
2197 | for (x = 0; x < rlist.rl_rgrps; x++) { | 2201 | for (x = 0; x < rlist.rl_rgrps; x++) { |
2198 | struct gfs2_rgrpd *rgd; | 2202 | struct gfs2_rgrpd *rgd; |
2199 | rgd = get_gl2rgd(rlist.rl_ghs[x].gh_gl); | 2203 | rgd = rlist.rl_ghs[x].gh_gl->gl_object; |
2200 | rg_blocks += rgd->rd_ri.ri_length; | 2204 | rg_blocks += rgd->rd_ri.ri_length; |
2201 | } | 2205 | } |
2202 | 2206 | ||
@@ -2205,7 +2209,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, | |||
2205 | goto out_rlist; | 2209 | goto out_rlist; |
2206 | 2210 | ||
2207 | error = gfs2_trans_begin(sdp, | 2211 | error = gfs2_trans_begin(sdp, |
2208 | rg_blocks + (DIV_RU(size, sdp->sd_jbsize) + 1) + | 2212 | rg_blocks + (DIV_ROUND_UP(size, sdp->sd_jbsize) + 1) + |
2209 | RES_DINODE + RES_STATFS + RES_QUOTA, l_blocks); | 2213 | RES_DINODE + RES_STATFS + RES_QUOTA, l_blocks); |
2210 | if (error) | 2214 | if (error) |
2211 | goto out_rg_gunlock; | 2215 | goto out_rg_gunlock; |