From: Andreas Gruenbacher Subject: Must not initialize inode->i_op to NULL Date: Fri, 28 Jan 2005 00:01:46 +0100 Message-Id: <1106866906.7616.55.camel@winden.suse.de> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit This pattern from 2.4 times doesn't work very well anymore :( Signed-off-by: Andreas Gruenbacher 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); }