Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169203
b: refs/heads/master
c: 1579343
h: refs/heads/master
i:
  169201: 02cc58b
  169199: fb27c6c
v: v3
  • Loading branch information
Steven Whitehouse committed Dec 3, 2009
1 parent 304cd97 commit 2021ef8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdcfde62dac64c86ff34e483c595d568a252c433
refs/heads/master: 1579343a73e32b5886e186e8f3e4db85e420ed3f
34 changes: 1 addition & 33 deletions trunk/fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,38 +525,6 @@ static struct gfs2_dirent *gfs2_dirent_scan(struct inode *inode, void *buf,
return ERR_PTR(-EIO);
}


/**
* dirent_first - Return the first dirent
* @dip: the directory
* @bh: The buffer
* @dent: Pointer to list of dirents
*
* return first dirent whether bh points to leaf or stuffed dinode
*
* Returns: IS_LEAF, IS_DINODE, or -errno
*/

static int dirent_first(struct gfs2_inode *dip, struct buffer_head *bh,
struct gfs2_dirent **dent)
{
struct gfs2_meta_header *h = (struct gfs2_meta_header *)bh->b_data;

if (be32_to_cpu(h->mh_type) == GFS2_METATYPE_LF) {
if (gfs2_meta_check(GFS2_SB(&dip->i_inode), bh))
return -EIO;
*dent = (struct gfs2_dirent *)(bh->b_data +
sizeof(struct gfs2_leaf));
return IS_LEAF;
} else {
if (gfs2_metatype_check(GFS2_SB(&dip->i_inode), bh, GFS2_METATYPE_DI))
return -EIO;
*dent = (struct gfs2_dirent *)(bh->b_data +
sizeof(struct gfs2_dinode));
return IS_DINODE;
}
}

static int dirent_check_reclen(struct gfs2_inode *dip,
const struct gfs2_dirent *d, const void *end_p)
{
Expand Down Expand Up @@ -1006,7 +974,7 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
divider = (start + half_len) << (32 - dip->i_depth);

/* Copy the entries */
dirent_first(dip, obh, &dent);
dent = (struct gfs2_dirent *)(obh->b_data + sizeof(struct gfs2_leaf));

do {
next = dent;
Expand Down

0 comments on commit 2021ef8

Please sign in to comment.