|
@@ -1684,6 +1684,14 @@ static int dir_new_leaf(struct inode *inode, const struct qstr *name)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static u16 gfs2_inode_ra_len(const struct gfs2_inode *ip)
|
|
|
|
+{
|
|
|
|
+ u64 where = ip->i_no_addr + 1;
|
|
|
|
+ if (ip->i_eattr == where)
|
|
|
|
+ return 1;
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* gfs2_dir_add - Add new filename into directory
|
|
* gfs2_dir_add - Add new filename into directory
|
|
* @inode: The directory inode
|
|
* @inode: The directory inode
|
|
@@ -1721,6 +1729,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
|
|
dent = gfs2_init_dirent(inode, dent, name, bh);
|
|
dent = gfs2_init_dirent(inode, dent, name, bh);
|
|
gfs2_inum_out(nip, dent);
|
|
gfs2_inum_out(nip, dent);
|
|
dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode));
|
|
dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode));
|
|
|
|
+ dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip));
|
|
tv = CURRENT_TIME;
|
|
tv = CURRENT_TIME;
|
|
if (ip->i_diskflags & GFS2_DIF_EXHASH) {
|
|
if (ip->i_diskflags & GFS2_DIF_EXHASH) {
|
|
leaf = (struct gfs2_leaf *)bh->b_data;
|
|
leaf = (struct gfs2_leaf *)bh->b_data;
|