> > > > /* fat/inode.c */ > > +extern int fat_block_truncate_page(struct inode *inode, loff_t from); > Hi OGAWA. > We can't use "static" for fat_block_truncate_page()? Block_truncate_page(., .., get_block) takes get_block as one of its arguments and in case of fat, fat_get_block is defined and marked static in fat/inode.c. We cannot use block_truncate_page() directly in fat/file.c. > > > --- a/fs/fat/file.c > > +++ b/fs/fat/file.c > > @@ -526,6 +526,8 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) > > down_write(&MSDOS_I(inode)->truncate_lock); > > truncate_setsize(inode, attr->ia_size); > > fat_truncate_blocks(inode, attr->ia_size); > > + if (inode->i_size & (inode->i_sb->s_blocksize - 1)) > > + fat_block_truncate_page(inode, inode->i_size); > > up_write(&MSDOS_I(inode)->truncate_lock); > > } > > Let's remove block alignment, because it was done in block_truncate_page(). > Then, move fat_block_truncate_page() before truncate_setsize(). > Looks like other fs calls it before truncate_setsize(). Yes, Right. I will change it. Thanks for review. > > Thanks. > -- > OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> -- 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