fix the getattr mess
PATCH 1/1 fix the getattr mess
2.4 never calls getattr, so no need to implement it.
In 2.6 use generic_fillattr and avoid tons of useless NULL-checks - if either of those was true we're in really deep problems and better panic then papering over it.
inode.c +4 -2
@@ -123,16 +125,18 @@ .mknod = ocfs_mknod, .rename = ocfs_rename, .setattr = ocfs_setattr, +#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,0 ) .getattr = ocfs_getattr, -#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,0 ) +#else .revalidate = ocfs_inode_revalidate,#endif };static struct inode_operations ocfs_file_iops = { .setattr = ocfs_setattr, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .getattr = ocfs_getattr, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +#else .revalidate = ocfs_inode_revalidate, #endif };
file.c +7 -68
93 lines not on this page · raw message