mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 00:10:09 +00:00
[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>
This commit is contained in:
parent
97a35d1e5f
commit
5bb76af1e0
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,8 @@
|
||||||
#define DO 0
|
#define DO 0
|
||||||
#define UNDO 1
|
#define UNDO 1
|
||||||
|
|
||||||
|
extern struct dentry_operations gfs2_dops;
|
||||||
|
|
||||||
static struct gfs2_sbd *init_sbd(struct super_block *sb)
|
static struct gfs2_sbd *init_sbd(struct super_block *sb)
|
||||||
{
|
{
|
||||||
struct gfs2_sbd *sdp;
|
struct gfs2_sbd *sdp;
|
||||||
|
@ -357,6 +359,7 @@ static int init_sb(struct gfs2_sbd *sdp, int silent, int undo)
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
iput(inode);
|
iput(inode);
|
||||||
}
|
}
|
||||||
|
sb->s_root->d_op = &gfs2_dops;
|
||||||
out:
|
out:
|
||||||
gfs2_glock_dq_uninit(&sb_gh);
|
gfs2_glock_dq_uninit(&sb_gh);
|
||||||
return error;
|
return error;
|
||||||
|
|
Loading…
Reference in a new issue