patch-2.3.47 linux/fs/nfs/file.c
Next file: linux/fs/nfs/inode.c
Previous file: linux/fs/ncpfs/sock.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Wed Feb 16 20:23:47 2000
- Orig file:
v2.3.46/linux/fs/nfs/file.c
- Orig date:
Thu Feb 10 17:11:18 2000
diff -u --recursive --new-file v2.3.46/linux/fs/nfs/file.c linux/fs/nfs/file.c
@@ -165,11 +165,16 @@
static int nfs_commit_write(struct file *file, struct page *page, unsigned offset, unsigned to)
{
long status;
+ loff_t pos = ((loff_t)page->index<<PAGE_CACHE_SHIFT) + to;
+ struct inode *inode = (struct inode*)page->mapping->host;
kunmap(page);
lock_kernel();
status = nfs_updatepage(file, page, offset, to-offset);
unlock_kernel();
+ /* most likely it's already done. CHECKME */
+ if (pos > inode->i_size)
+ inode->i_size = pos;
return status;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)