Re: 2.6.11-rc2-mm1: kernel bad access while booting diskless client

From: Andreas Gruenbacher
Date: Thu Jan 27 2005 - 18:14:21 EST


Hello again,

this looks like a good candidate. Could you please try if it fixes the
problem?

Thanks,
--
Andreas Gruenbacher <agruen@xxxxxxx>
SUSE Labs, SUSE LINUX GMBH
--- Begin Message --- This pattern from 2.4 times doesn't work very well anymore :(

Signed-off-by: Andreas Gruenbacher <agruen@xxxxxxx>

Index: linux-2.6.11-latest/fs/nfs/inode.c
===================================================================
--- linux-2.6.11-latest.orig/fs/nfs/inode.c
+++ linux-2.6.11-latest/fs/nfs/inode.c
@@ -688,7 +688,7 @@ nfs_init_locked(struct inode *inode, voi
#define NFS_LIMIT_READDIRPLUS (8*PAGE_SIZE)

#ifdef CONFIG_NFS_ACL
-static struct inode_operations nfs_special_inode_operations[] = {{
+static struct inode_operations nfs_special_inode_operations = {
.permission = nfs_permission,
.getattr = nfs_getattr,
.setattr = nfs_setattr,
@@ -696,9 +696,7 @@ static struct inode_operations nfs_speci
.getxattr = nfs_getxattr,
.setxattr = nfs_setxattr,
.removexattr = nfs_removexattr,
-}};
-#else
-#define nfs_special_inode_operations NULL
+};
#endif /* CONFIG_NFS_ACL */

/*
@@ -755,7 +753,9 @@ nfs_fhget(struct super_block *sb, struct
} else if (S_ISLNK(inode->i_mode))
inode->i_op = &nfs_symlink_inode_operations;
else {
- inode->i_op = nfs_special_inode_operations;
+#ifdef CONFIG_NFS_ACL
+ inode->i_op = &nfs_special_inode_operations;
+#endif
init_special_inode(inode, inode->i_mode, fattr->rdev);
}


--- End Message ---