4,441
社区成员
发帖
与我相关
我的任务
分享
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35))
#define YAFFS_USE_SETATTR_COPY
#define YAFFS_USE_TRUNCATE_SETSIZE
#endif
/* ... */
static int yaffs_vfs_setsize(struct inode *inode, loff_t newsize)
{
#ifdef YAFFS_USE_TRUNCATE_SETSIZE
truncate_setsize(inode,newsize);
return 0;
#else
return simple_setsize(inode, newsize);
#endif
}