Skip to contentSkip to conversation

fix the getattr mess

PATCH New Christoph Hellwig 1 participant 1 message Jun 2, 2004 OCFS2

lore
Share & tools
lore
#0 lore raw

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
Index: src/inode.c
===================================================================
@@ -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