On Thu, May 27, 2010 at 01:05:35AM +1000, npiggin@xxxxxxx wrote: > =================================================================== > --- linux-2.6.orig/fs/configfs/inode.c > +++ linux-2.6/fs/configfs/inode.c > @@ -78,9 +78,13 @@ int configfs_setattr(struct dentry * den > if (error) > return error; > > - error = inode_setattr(inode, iattr); > - if (error) > - return error; > + if (iattr->ia_valid & ATTR_SIZE) { > + error = simple_setsize(inode, iattr->ia_size); > + if (error) > + return error; > + } > + > + generic_setattr(inode, iattr); > > if (!sd_iattr) { > /* setting attributes for the first time, allocate now */ That should use simple_setattr() instead of generic_setattr(); look at the check just before this chunk... > +++ linux-2.6/fs/block_dev.c > @@ -172,8 +172,9 @@ blkdev_direct_IO(int rw, struct kiocb *i > struct file *file = iocb->ki_filp; > struct inode *inode = file->f_mapping->host; > > - return blockdev_direct_IO_no_locking(rw, iocb, inode, I_BDEV(inode), > - iov, offset, nr_segs, blkdev_get_blocks, NULL); > + return blockdev_direct_IO_no_locking_newtrunc(rw, iocb, inode, > + I_BDEV(inode), iov, offset, nr_segs, > + blkdev_get_blocks, NULL); > } > > int __sync_blockdev(struct block_device *bdev, int wait) > @@ -309,8 +310,8 @@ static int blkdev_write_begin(struct fil > struct page **pagep, void **fsdata) > { > *pagep = NULL; > - return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, > - blkdev_get_block); > + return block_write_begin_newtrunc(file, mapping, pos, len, flags, > + pagep, fsdata, blkdev_get_block); > } And that should be folded back into the patch #1. -- 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