--- cowloop-3.0/src/cowloop.c.orig 2006-12-22 18:28:09.000000000 +1100 +++ cowloop-3.0/src/cowloop.c 2006-12-22 18:31:13.000000000 +1100 @@ -238,6 +238,7 @@ #include #endif #include +#include #include #include #include @@ -1507,7 +1508,11 @@ cowdev->cowwrites % SPCDFLINTVL == 0 ) { struct kstatfs ks; +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) if (vfs_statfs(cowdev->cowfp->f_dentry->d_inode->i_sb, &ks)==0){ +#else + if (vfs_statfs(cowdev->cowfp->f_dentry, &ks)==0){ +#endif if (ks.f_bavail <= SPCMINBLK) { switch (ks.f_bavail) { case 0: @@ -1814,7 +1819,11 @@ /* ** administer total and available size of filesystem holding cowfile */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) if (vfs_statfs(cowdev->cowfp->f_dentry->d_inode->i_sb, &ks) == 0) { +#else + if (vfs_statfs(cowdev->cowfp->f_dentry, &ks) == 0) { +#endif cowdev->blksize = ks.f_bsize; cowdev->blktotal = ks.f_blocks; cowdev->blkavail = ks.f_bavail;