aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRobert S Peterson <rpeterso@redhat.com>2006-05-05 16:29:50 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-05-05 16:29:50 -0400
commit5bb76af1e089ac186c15c6aa792340d22b63d4b4 (patch)
tree3568b59476b8f9df444164005cdf04b9ce7c231b /fs
parent97a35d1e5fab9ff8de27814082b78b2fc9ad94f0 (diff)
[GFS2] Set d_ops for root inode
Well, I managed to track down the bug in gfs2 that was causing my grief. Below is a patch for the problem. Please incorporate as you see fit. Or should I say: as you see git. The problem was basically that you never set d_ops for the root inode, so the wrong hash algorithm was being used. But only for the root directory. Turns out that if I used subdirectories, it used the proper hash and my files were found just fine. Signed-off-by: Robert S Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_fstype.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index d19d98766aa5..f252723b37da 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -40,6 +40,8 @@
40#define DO 0 40#define DO 0
41#define UNDO 1 41#define UNDO 1
42 42
43extern struct dentry_operations gfs2_dops;
44
43static struct gfs2_sbd *init_sbd(struct super_block *sb) 45static struct gfs2_sbd *init_sbd(struct super_block *sb)
44{ 46{
45 struct gfs2_sbd *sdp; 47 struct gfs2_sbd *sdp;
@@ -357,6 +359,7 @@ static int init_sb(struct gfs2_sbd *sdp, int silent, int undo)
357 error = -ENOMEM; 359 error = -ENOMEM;
358 iput(inode); 360 iput(inode);
359 } 361 }
362 sb->s_root->d_op = &gfs2_dops;
360out: 363out:
361 gfs2_glock_dq_uninit(&sb_gh); 364 gfs2_glock_dq_uninit(&sb_gh);
362 return error; 365 return error;