aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-01-30 13:34:10 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-01-30 13:34:10 -0500
commitf42faf4fa4eaf7e108dd60f3f2ca5c6e9b45352c (patch)
tree23bf95db3b941a4b14f8b90f98a8aaa663ed6c81 /fs/gfs2/inode.h
parentfd2ee6bb1ef02dfe1f1e1f5b44322e0854596e9a (diff)
[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 <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r--fs/gfs2/inode.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h
index 4df7da51f715..e42ae38d6778 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);
60 60
61int gfs2_repermission(struct inode *inode, int mask, struct nameidata *nd); 61int gfs2_repermission(struct inode *inode, int mask, struct nameidata *nd);
62 62
63static inline int gfs2_lookup_simple(struct gfs2_inode *dip, char *name, 63static inline int gfs2_lookup_simple(struct inode *dip, char *name,
64 struct gfs2_inode **ipp) 64 struct inode **ipp)
65{ 65{
66 struct gfs2_inode *ip;
66 struct qstr qstr; 67 struct qstr qstr;
68 int err;
67 memset(&qstr, 0, sizeof(struct qstr)); 69 memset(&qstr, 0, sizeof(struct qstr));
68 qstr.name = name; 70 qstr.name = name;
69 qstr.len = strlen(name); 71 qstr.len = strlen(name);
70 return gfs2_lookupi(dip, &qstr, 1, ipp); 72 err = gfs2_lookupi(get_v2ip(dip), &qstr, 1, &ip);
73 if (err == 0) {
74 *ipp = gfs2_ip2v(ip);
75 if (*ipp == NULL)
76 err = -ENOMEM;
77 gfs2_inode_put(ip);
78 }
79 return err;
71} 80}
72 81
73#endif /* __INODE_DOT_H__ */ 82#endif /* __INODE_DOT_H__ */