From f42faf4fa4eaf7e108dd60f3f2ca5c6e9b45352c Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 30 Jan 2006 18:34:10 +0000 Subject: [GFS2] Add gfs2_internal_read() Add the new external read function. Its temporarily in jdata.c even though the protoype is in ops_file.h - this will change shortly. The current implementation will change to a page cache one when that happens. In order to effect the above changes, the various internal inodes now have Linux inodes attached to them. We keep the references to the Linux inodes, rather than the gfs2_inodes in the super block. In order to get everything to work correctly I've had to reorder the init sequence on mount (which I should probably have done earlier when .gfs2_admin was made visible). Signed-off-by: Steven Whitehouse --- fs/gfs2/inode.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'fs/gfs2/inode.h') diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 4df7da51f71..e42ae38d677 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h @@ -60,14 +60,23 @@ int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr); int gfs2_repermission(struct inode *inode, int mask, struct nameidata *nd); -static inline int gfs2_lookup_simple(struct gfs2_inode *dip, char *name, - struct gfs2_inode **ipp) +static inline int gfs2_lookup_simple(struct inode *dip, char *name, + struct inode **ipp) { + struct gfs2_inode *ip; struct qstr qstr; + int err; memset(&qstr, 0, sizeof(struct qstr)); qstr.name = name; qstr.len = strlen(name); - return gfs2_lookupi(dip, &qstr, 1, ipp); + err = gfs2_lookupi(get_v2ip(dip), &qstr, 1, &ip); + if (err == 0) { + *ipp = gfs2_ip2v(ip); + if (*ipp == NULL) + err = -ENOMEM; + gfs2_inode_put(ip); + } + return err; } #endif /* __INODE_DOT_H__ */ -- cgit v1.2.3-70-g09d2