summaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /fs/nfs/file.c
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 2135ece68..911b61b9c 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -165,11 +165,16 @@ static int nfs_prepare_write(struct page *page, unsigned offset, unsigned to)
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;
}