On Sunday 25 November 2007 20:50:56 Erez Zadok wrote: > In message <[EMAIL PROTECTED]>, Paul Hewlett writes: > > Please ignore previous post - here is correct patch (apologies)
> Paul, the problem with this patch, as I alluded to in my previous email, is > that unionfs won't compile unless the RT patches are applied: the vanilla > kernel doesn't have a mapping_nrpages() function. I'd like to avoid > keeping two sets of unionfs-patches, one for RT users and one for those who > don't use RT. I could have created a simple wrapper macro to replace Erez This patch should be generic ... Paul diff -ur unionfs.org/dentry.c unionfs/dentry.c --- unionfs.org/dentry.c 2007-11-26 11:08:22.000000000 +0200 +++ unionfs/dentry.c 2007-11-26 11:10:00.000000000 +0200 @@ -264,7 +264,11 @@ /* remove all non-private mappings */ unmap_mapping_range(inode->i_mapping, 0, 0, 0); +#ifdef CONFIG_PREEMPT_RT + if (mapping_nrpages(&inode->i_data)) +#else if (inode->i_data.nrpages) +#endif truncate_inode_pages(&inode->i_data, 0); } diff -ur unionfs.org/super.c unionfs/super.c --- unionfs.org/super.c 2007-11-26 11:08:22.000000000 +0200 +++ unionfs/super.c 2007-11-26 11:09:37.000000000 +0200 @@ -70,8 +70,11 @@ static void unionfs_delete_inode(struct inode *inode) { i_size_write(inode, 0); /* every f/s seems to do that */ - +#ifdef CONFIG_PREEMPT_RT + if (mapping_nrpages(&inode->i_data)) +#else if (inode->i_data.nrpages) +#endif truncate_inode_pages(&inode->i_data, 0); clear_inode(inode); ~ -- Paul Hewlett Technical Director Global Call Center Solutions Ltd, 2nd Floor, Milnerton Mall Cnr Loxton & Koeberg Roads, 7435 Milnerton www.gccs.co.za Tel: +27 86 111 3433 Fax: +27 86 111 3520 Cel: +27 76 072 7906 VOIP: 087 750 7474 _______________________________________________ unionfs mailing list: http://unionfs.filesystems.org/ unionfs@mail.fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs