aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-20 12:30:04 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-20 12:30:04 -0500
commitc752666c17f870fa8ae9f16804dd457e9e6daaec (patch)
treec3c48383f386a24edbdf3c6292f25b587e6d9368 /fs/gfs2/inode.h
parent419c93e0b6b9eef0bf26b8ad415f2a5bf4300119 (diff)
downloadkernel_goldelico_gta04-c752666c17f870fa8ae9f16804dd457e9e6daaec.zip
kernel_goldelico_gta04-c752666c17f870fa8ae9f16804dd457e9e6daaec.tar.gz
kernel_goldelico_gta04-c752666c17f870fa8ae9f16804dd457e9e6daaec.tar.bz2
[GFS2] Fix bug in directory code and tidy up
Due to a typo, the dir leaf split operation was (for the first split in a directory) writing the new hash vaules at the wrong offset. This is now fixed. Also some other tidy ups are included: - We use GFS2's hash function for dentries (see ops_dentry.c) so that we don't have to keep recalculating the hash values. - A lot of common code is eliminated between the various directory lookup routines. - Better error checking on directory lookup (previously different routines checked for different errors) - The leaf split operation has a couple of redundant operations removed from it, so it should be faster. There is still further scope for further clean ups in the directory code, and readdir in particular could do with slimming down a bit. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r--fs/gfs2/inode.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h
index c3fa6cf..0dd2a26 100644
--- a/fs/gfs2/inode.h
+++ b/fs/gfs2/inode.h
@@ -44,8 +44,8 @@ void gfs2_inode_destroy(struct gfs2_inode *ip);
int gfs2_inode_dealloc(struct gfs2_sbd *sdp, struct gfs2_unlinked *ul);
int gfs2_change_nlink(struct gfs2_inode *ip, int diff);
-int gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root,
- struct inode **ipp);
+struct inode *gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root,
+ struct nameidata *nd);
struct inode *gfs2_createi(struct gfs2_holder *ghs, struct qstr *name,
unsigned int mode);
int gfs2_unlinki(struct gfs2_inode *dip, struct qstr *name,
@@ -66,17 +66,7 @@ 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 inode *dip, char *name,
- struct inode **ipp)
-{
- struct qstr qstr;
- int err;
- memset(&qstr, 0, sizeof(struct qstr));
- qstr.name = name;
- qstr.len = strlen(name);
- err = gfs2_lookupi(dip, &qstr, 1, ipp);
- return err;
-}
+struct inode *gfs2_lookup_simple(struct inode *dip, const char *name);
#endif /* __INODE_DOT_H__ */