Commit 4fe33674 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents d98d10eb 78e1b029
......@@ -68,10 +68,17 @@ int inode_setattr(struct inode * inode, struct iattr * attr)
int error = 0;
if (ia_valid & ATTR_SIZE) {
if (attr->ia_size != inode->i_size)
if (attr->ia_size != inode->i_size) {
error = vmtruncate(inode, attr->ia_size);
if (error || (ia_valid == ATTR_SIZE))
goto out;
} else {
/*
* We skipped the truncate but must still update
* timestamps
*/
ia_valid |= ATTR_MTIME|ATTR_CTIME;
}
}
lock_kernel();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment