Dmitry Monakhov <dmonakhov@xxxxxxxxxx> writes: > This patch fix nasty bug with truncate on swapfile. > It contains only vfs core helpers and fix isize check path for > fs w/o i_op->setattr method. Later i'll send corresponding changes > to other fs which has ->setattr method. > > This patch is depends on Nick's patch > http://marc.info/?l=linux-fsdevel&m=126752788514574&w=2 <skip> > diff --git a/include/linux/fs.h b/include/linux/fs.h > index 81c91d9..fb6809d 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -2388,9 +2388,10 @@ extern int buffer_migrate_page(struct address_space *, > #else > #define buffer_migrate_page NULL > #endif > - > -extern int inode_change_ok(const struct inode *, struct iattr *); Following define will be removed after all filesystems will be moved to new isize check sequance. This will be the signal for external modules to migrate to new logic. > +#define inode_change_ok(inode, iattr) inode_change_posix_ok(inode, iattr) > +extern int inode_change_posix_ok(const struct inode *, struct iattr *); > extern int inode_newsize_ok(const struct inode *, loff_t offset); > +extern int inode_change_attr_ok(const struct inode *, struct iattr *); > extern int __must_check inode_setattr(struct inode *, const struct iattr *); > extern void generic_setattr(struct inode *inode, const struct iattr *attr); -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html