[GFS2] Fix bug in directory code and tidy up
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 20 Mar 2006 17:30:04 +0000 (12:30 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 20 Mar 2006 17:30:04 +0000 (12:30 -0500)
commitc752666c17f870fa8ae9f16804dd457e9e6daaec
treec3c48383f386a24edbdf3c6292f25b587e6d9368
parent419c93e0b6b9eef0bf26b8ad415f2a5bf4300119
[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>
fs/gfs2/dir.c
fs/gfs2/dir.h
fs/gfs2/inode.c
fs/gfs2/inode.h
fs/gfs2/ondisk.c
fs/gfs2/ops_dentry.c
fs/gfs2/ops_export.c
fs/gfs2/ops_fstype.c
fs/gfs2/ops_inode.c
fs/gfs2/super.c
include/linux/gfs2_ondisk.h